Module-Setup

 view release on metacpan or  search on metacpan

lib/Module/Setup/Test/Flavor.pm  view on Meta::CPAN

        *ok   = sub ($;$) { 1 };
        *like = sub ($$;$) { 1 };
        *plan = sub {};
    }

    for my $func (qw/ run_flavor_test name flavor files file dirs options default_dialog dialog /) {
        no strict 'refs';
        *{"$caller\::$func"} = \&{ $func };
    }

    strict->import;
    warnings->import;
}

my $tests = {};
sub name ($) {
    $tests->{module} = shift;
}
sub flavor ($) {
    $tests->{flavor_class} = shift;
}

lib/Module/Setup/Test/Utils.pm  view on Meta::CPAN

sub import {
    my $class  = shift;
    my $caller = caller;
    my %args   = @_;

    for my $func (qw/ context module_setup stdout dialog default_dialog setup_dir target_dir clear_tempdir flavors_dir template_dir additional_dir additional_config_file plugins_dir config_file /) {
        no strict 'refs';
        *{"$caller\::$func"} = \&{ $func };
    }

    strict->import;
    warnings->import;

    unless ($args{without_stdout}) {
        no warnings 'redefine';
        *Module::Setup::stdout = sub { push @{ $stdout }, $_[1] };
    }
}

sub _path_dir (@) {
    Module::Setup::Path::Dir->new(@_);



( run in 0.350 second using v1.01-cache-2.11-cpan-299005ec8e3 )