Config-PL
view release on metacpan or search on metacpan
lib/Config/PL.pm view on Meta::CPAN
2526272829303132333435363738394041424344
@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 )