I'm a bit new to this so please bear with me...
I've written a script that uses CGI.pm something like this:
use CGI::Carp qw(fatalsToBrowser); use CGI qw(:all);
$query = new CGI;
....blah...blah... &myfunc($query); ....blah...blah...
sub myfunc{ my ($query) = @_; $foo=$query->param("foo"); ...more...blah...blah... }
Everything works fine as is, but I'm trying to take the function "myfunc"
out and put it in a separate .pm file because I need to call it from several
cgi scripts. When I put it in the .pm file, I get something like:
Can't locate object method "param" via package "Trend" at /usr/local/lib/perl5/site_perl/5.005/MMC/Dex.pm line 253, <INFILE> chunk 1150.
I do have: use CGI::Carp qw(fatalsToBrowser); use CGI qw(:all); In the .pm file
What am I missing?
Thanks, -Dan
If you have name the package file as say Mypackage.pm then in your mail program you will call the function as Mypackage::myfunc($query).
Ram
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]