in reply to Listing all Constants and values
So there we just look for the constants that have been declared in Your::Module, grab the constant name, execute the constant sub of that name for the value, and then print them both out.require Your::Module; my $pkg = 'Your::Module'; for(grep /^$pkg\::/, keys %constant::declared) { my($name) = /::(\w+)$/; my $val = $pkg->can($name)->(); print "$name: $val\n"; }
_________
broquaint
|
|---|