Included libraries | Package variables | General documentation | Methods |
WebCvs | Raw content |
package_stash | No description | Code |
package_stash | description | prev | next | Top |
my ($packageName) = @_; my %result ; local (*alias); *stash = *{"${packageName}::"}; while (($varName, $globValue) = each %stash) { # only return the config hash}
next if $varName =~m/BEGIN/; next if $varName =~m/import/; *alias = $globValue; $result{$varName}=$alias if (defined ($alias)) ; $result{$varName}=\@alias if (defined (@alias)) ; $result{$varName}=\%alias if (defined (%alias)) ; } if (scalar(keys %result >1) ) { throw("Have more than one item exported from $packageName - you'll run into trouble\n") } my $hash_name = shift @{[(keys %result)]}; return [$result{$hash_name},$hash_name] ; } 1;