You need to setup exports in your Rules1 package.
 
Take a look at Exporter. (perldoc Exporter)
 
OR, call the function with its fully qualified package name

Tim Edwards <[EMAIL PROTECTED]> wrote:
I in the process of switching my scripts over to Mod Perl.

I decide since Mod Perl doesn't like Sub routine in the the main program I'd
export make Modules out of the more come ones. Simple process I thought.
However no mater what I do I get an error. I tried making a simple one using
the example code from the site and failed stil.

Error:

Undefined subroutine &main::CISCHeader called at /var/www/perl/test.pl line
5.

Here the Module Located in the ModPerl Directory under the a directory
listed int eh @inc:

package ModPerl::Rules1;

sub CISCHeader {
print "Content-type: text/plain\n\n";
print "mod_perl rules!\n";
return 1;
}
1;

The Script:

#!/usr/bin/perl -w
use strict;
use ModPerl::Rules1;

CISCHeader();

I'm Stumpped and would love some advise or suggestions.

_________________________________________________________________
Enter for your chance to IM with Bon Jovi, Seal, Bow Wow, or Mary J Blige
using MSN Messenger http://entertainment.msn.com/imastar



--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html


www.bluewolverine.com


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

Reply via email to