jh has asked for the wisdom of the Perl Monks concerning the following question:
When I use this module, I always want everything imported (don't worry, this is never going anywhere near CPAN). I know I can add everything to @EXPORT but I would prefer to write a custom export_to_level function that just always exports all variables.package MyRegex; our $rgx_number = qr/[0-9]/; our $rgx_letter = qr/[a-zA-Z]/; # etc.
I know how to export a symbol if I have the name, but I don't know how to get the names of all the symbols in the package.
I am sure there is a CPAN module that does this but that fly in the ointment is that I cannot install CPAN modules on this server. I can only use standard Perl 5.8 modules... :-(
Any ideas?
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: export all symbols
by merlyn (Sage) on Jan 21, 2009 at 17:16 UTC | |
by jh (Beadle) on Jan 21, 2009 at 22:00 UTC | |
by doom (Deacon) on Jan 21, 2009 at 20:24 UTC | |
|
Re: export all symbols
by marcussen (Pilgrim) on Jan 22, 2009 at 00:00 UTC | |
by jh (Beadle) on Feb 23, 2009 at 19:26 UTC | |
|
Re: export all symbols
by Zarchne (Novice) on Jan 24, 2009 at 01:41 UTC | |
by jh (Beadle) on Feb 23, 2009 at 19:31 UTC |