Template-Plugin-CPAN-Packages

 view release on metacpan or  search on metacpan

inc/Module/Install/StandardTests.pm  view on Meta::CPAN



sub write_standard_test_compile {
    my $self = shift;
    $self->write_test_file('000_standard__compile.t', q/
        BEGIN {
            use Test::More;
            eval "use Test::Compile";
            Test::More->builder->BAIL_OUT(
                "Test::Compile required for testing compilation") if $@;
            all_pm_files_ok();
        }
    /);
}


sub write_standard_test_pod {
    my $self = shift;
    $self->write_test_file('000_standard__pod.t', q/
        use Test::More;
        eval "use Test::Pod";

inc/Test/Compile.pm  view on Meta::CPAN



my $Test = Test::Builder->new;


sub import {
    my $self = shift;
    my $caller = caller;

   for my $func (qw(
       pm_file_ok pl_file_ok all_pm_files all_pl_files all_pm_files_ok
       all_pl_files_ok
       )) {

        no strict 'refs';
        *{$caller."::".$func} = \&$func;
    }

    $Test->exported_to($caller);
    $Test->plan(@_);
}

inc/Test/Compile.pm  view on Meta::CPAN

        $Test->ok(0, 'Script does not compile');
        $Test->diag($out);
        return;
    } else {
        $Test->ok(1);
        return 1;
    }
}


sub all_pm_files_ok {
    my @files = @_ ? @_ : all_pm_files();

    $Test->plan(tests => scalar @files);

    my $ok = 1;
    for (@files) {
        pm_file_ok($_) or undef $ok;
    }
    $ok;
}



( run in 1.775 second using v1.01-cache-2.11-cpan-99c4e6809bf )