perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Chamas <jos...@chamas.com>
Subject Re: Apache::ASP error re: subroutines
Date Tue, 22 May 2001 21:49:21 GMT
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 asp@perl.apache.org,
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.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Mime
View raw message