Apache::ASP error re: subroutines

2001-05-22 Thread Andrew Koebrick

Howdy,

I am attempting to move a few subroutines from my Apache::ASP pages into a central 
module, but get the error:

Undefined subroutine Apache::ASP::Demo::date_swap called at (eval 6) line 67. , 
/usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1506 

Is there something funky in the Apache::ASP environment regarding how/where modules 
are handled?  The functions work when in the page, so I dont think there is an 
internal error there.  I am calling the module with a basic use ASK (ASK.pm is the 
module name).  The module has appropriate ownership/rights. 

I am especially curious why it is looking for dateswap under Apache::Demo::XXX

Any assistance appreciated.  This is my first module and so my error could be 
anywhere, as my ignorance is everywhere.

ASK

Andrew Koebrick
Web Coordinator/Librarian
MN-Planning (Office of Strategic and Long Range Planning)
658 Cedar St., Suite 300
St. Paul, MN 55155

651-296-4156 phone
651-296-3698 fax

www.mnplan.state.mn.us





Re: Apache::ASP error re: subroutines

2001-05-22 Thread Joshua Chamas

Andrew Koebrick wrote:
 
 Howdy,
 
 I am attempting to move a few subroutines from my Apache::ASP pages into a central 
module, but get the error:
 
 Undefined subroutine Apache::ASP::Demo::date_swap called at (eval 6) line 67. , 
/usr/lib/perl5/site_perl/5.6.0/Apache/ASP.pm line 1506

PerlSetVar GlobalPackage is set to Apache::ASP::Demo I bet, and you called
the sub date_swap() which was not defined there.

 
 Is there something funky in the Apache::ASP environment regarding how/where modules 
are handled?  The functions work when in the page, so I dont think there is an 
internal error there.  I am calling the module with a basic use ASK (ASK.pm is the 
module name).  The module has appropriate ownership/rights.
 

If you sub is in ASK.pm, then you can reference it like:

  ASK::date_swap()

or you could define the sub in the global.asa, which takes
on the package name from GlobalPackage, so the sub will be 
in the same package that all your scripts are compiled into.

 I am especially curious why it is looking for dateswap under Apache::Demo::XXX
 

This is the package that your ASP scripts  includes are compiled into.

Also there is a new mailing list for Apache::ASP at [EMAIL PROTECTED],
but I have been slow to update the docs at the ASP web site  README.

--Josh

_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051