WC -Sx- Jones wrote:
JupiterHost.Net wrote:
Will work whether I do the require or use way....
require doesn't let you specify what to EXPORT though which is one of the goals of this funtion...
use does import the module's name *and* does the EXPORT symbols also *if* its called inside package Foo;
Do you *have* to export them?
That's part of the convenience :)
Using referneces didn't work and neither did fully naming them with the caller's package....
perl -mstrict -we 'use Foo qw(mod);if(mod("CGI","header")) { print header(); }'
does not and that is what I need it to do...
perl -mstrict -we 'use CGI qw(mod);\ if(mod("CGI","$CGI::header")) { print $CGI::header(); }'
Name your spaces fully. Yes, it gives a new error, but I'm not a Perl one-liner person...
I can do mod("CGI") and still do CGI::whatever i want so in that case I might as wlel just require()...
It seems like I need to fool use() into thinking it's being called by (caller())[0] (IE usually 'main' but not necessarily) instead of the actual package name mod() is exported from (unless its being calle d inside that package of course...
Thanks for the brain storming session :)
Lee.M - JupiterHost.Net
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>