Acme-ReturnValue

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    - added disqus comments (Thomas Klausner)
    - sort packages (Thomas Klausner)
    - more compact cool values list (Thomas Klausner)
    - dist::zilla (Thomas Klausner)
    - whitespace/docs (Thomas Klausner)
    - keep track of files/dists analysed, only one json output file (Thomas Klausner)
    - ignore __PACKAGE__ and make_immutable (Thomas Klausner)
    - encode now happens in code, so remove it from t (Thomas Klausner)
    - switched to JSON, more Path::Class (Thomas Klausner)
    - use ->spew to write data (Thomas Klausner)
    - proper utf8 fix (RT83963_UTF8_broken) (Thomas Klausner)
    - added utf8 test case (spotted by saper)


0.70.0 2009-05-13 09:20:18
    - switched to Moose & MooseX::Getopt
    - use YAML for serialization
    - much better detection of false positves
    - generate a sort-of-nice website


0.05   Tue Mar  4 21:02:14 CET 2008

lib/Acme/ReturnValue.pm  view on Meta::CPAN

    my @significant = grep { _is_code($_) } $doc->schildren();
    my $match = $significant[-1];
    my $rv=$match->content;
    $rv=~s/\s*;$//;
    $rv=~s/^return //gi;

    return if $rv eq 1;
    return if $rv eq '__PACKAGE__';
    return if $rv =~ /^__PACKAGE__->meta->make_immutable/;

    $rv = decode_utf8($rv);

    my $data = {
        'file'    => $filename,
        'package' => $this_package,
        'PPI'     => ref $match,
    };

    my @bad = map { 'PPI::Statement::'.$_} qw(Sub Variable Compound Package Scheduled Include Sub);

    if (any { ref($match) eq $_ } @bad) {

t/interesting.t  view on Meta::CPAN

#!/usr/bin/env perl
use Test::Most;
use Acme::ReturnValue;
use utf8;
use Encode;

{
    my $arv=Acme::ReturnValue->new;
    $arv->in_file('t/pms/Interesting.pm');
    cmp_deeply($arv->failed,[],'no failed');
    cmp_deeply($arv->bad,[],'no bad');
    
    my $data = $arv->interesting->[0];
    is($data->{package},'Interesting','package');

t/interesting.t  view on Meta::CPAN

    my $arv=Acme::ReturnValue->new;
    $arv->in_file('t/pms/RT83963_encoding.pm');
    cmp_deeply($arv->failed,[],'no failed');
    cmp_deeply($arv->bad,[],'no bad');

    my $data = $arv->interesting->[0];
    is($data->{package},'Acme::CPANAuthors::French','package');
    is($data->{value},'q<
    listen to 「陽の当たる月曜日」 by サエキけんぞう
    » http://www.myspace.com/cloclomadeinjapan
>','utf8 value');
}

{
    my $arv=Acme::ReturnValue->new;
    $arv->in_file('t/pms/Envolve.pm');
    cmp_deeply($arv->failed,[],'no failed');
    cmp_deeply($arv->bad,[],'no bad');
    cmp_deeply($arv->interesting,[],'no interesting');

    my $data = $arv->interesting->[0];

t/pms/RT83963_encoding.pm  view on Meta::CPAN

package Acme::CPANAuthors::French;
use utf8;
use strict;
use warnings;

{
    no strict "vars";
    $VERSION = "0.09";
}

use Acme::CPANAuthors::Register (
    SAPER       => "Sébastien Aperghis-Tramoni (Maddingue)",

t/pms/RayApp.pm  view on Meta::CPAN

		close FILE or die "Error reading `$application' during close: $!\n";
		if (${^TAINT}) {
			$content =~ /^(.*)$/s and $content = $1;
		}
		my $max_num = $self->{max_handler_num};
		if (not defined $max_num) {
			$max_num = 0;
		}
		$self->{max_handler_num} = ++$max_num;
		my $appname = $application;
		utf8::decode($appname);
		{
		no warnings 'redefine';
		eval qq!#line 1 "$appname"\npackage RayApp::Root::pkg$max_num; ! 
			. $content
			or die "Compiling `$application' did not return true value\n";
		}
		my $handler = 'RayApp::Root::pkg' . $max_num . '::handler';
		$self->{handlers}{$application} = {
			handler => $handler,
		};

t/pms/RayApp.pm  view on Meta::CPAN

			}
			my $max_num = $self->{max_handler_num};
			if (not defined $max_num) {
				$max_num = 0;
			}
			## $content =~ s/(.*)/$1/s;
			$max_num++;
			{
			no warnings 'redefine';
			my $appname = $application;
			utf8::decode($appname);
			eval qq!package $package;\n#line 1 "$appname"\n!
				. $content
				or die "Compiling `$application' did not return true value\n";
			}
			$self->{handlers}{$application} = {
				handler => $handler,
				mtime => $mtime,
			};
		}
		no strict;



( run in 3.211 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )