Config-PL

 view release on metacpan or  search on metacpan

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

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    @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.330 second using v1.01-cache-2.11-cpan-e5176c747c2 )