OWL2Perl

 view release on metacpan or  search on metacpan

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

    my $varname = @_ ? shift : 'CONFIG';
    require Data::Dumper;
    return Data::Dumper->Dump ( [\%Config], [$varname]);
}

# imports names into the caller's namespace as global variables;
# adapted from the same method in Config::Simple

sub import_names {
    shift;
    my $namespace = @_ ? shift : (caller)[0];
    return if $namespace eq 'OWL::Config';

    no strict 'refs';
    no warnings;   # avoid "Useless use of a variable..."
    while ( my ($key, $value) = each %Config ) {
	$key =~ s/\W/_/g;
	${$namespace . '::' . uc($key)} = $value;
    }
}



( run in 0.544 second using v1.01-cache-2.11-cpan-a3c8064c92c )