Config-PL

 view release on metacpan or  search on metacpan

lib/Config/PL.pm  view on Meta::CPAN

    @export = @EXPORT unless @export;

    for my $func (@export) {
        Carp::croak "'$func' is not exportable function" unless grep {$_ eq $func} @EXPORT;

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

sub config_do($) {
    my $config_file = shift;
    my (undef, $file,) = caller;

    my ($config, $errno) = do {
        local @INC = (Cwd::getcwd, File::Basename::dirname($file));
        push @INC, $CONFIG{path} if defined $CONFIG{path};

        (scalar do $config_file, $!);
    };



( run in 0.552 second using v1.01-cache-2.11-cpan-65fba6d93b7 )