Would anyone find it useful to have a UNIVERSAL method which reports
on what sybols a given module exports? For example:
package Foo;
@EXPORT = qw(this @that);
@EXPORT_OK = qw($up down);
# this, @that, $up, down
print join ", ", Foo->exports;
With an argument, it would be analgous to can():
print "Yes" if Foo->exports('this');
This can be useful for sanity checking when doing incestuous things
with modules:
if( $error ) {
require Carp;
assert( Carp->exports('cluck') );
Carp::cluck('The Royal Air Force does not allow chickens to '.
'fly planes!');
}
--
Michael G Schwern http://www.pobox.com/~schwern/ [EMAIL PROTECTED]
Just Another Stupid Consultant Perl6 Kwalitee Ashuranse
But why? It's such a well designed cesspool of C++ code. Why wouldn't
you want to hack mozilla?
-- Ziggy