[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apache My::Module::handler undefined -- but it's defined!



okay, this is a bit off topic. but since the debian incarnation
of apache is a bit different from the roll-your-own style for
other distros i'm hoping someone here can at least shed a glimmer
of light on this...

"undefined subroutine Some::Package::handler" even though it's
CLEARLY defined in the Some/Package.pm file as "sub handler { ...  }"

--

i'm working on an apache mod_perl module:

	package My::Module;

	sub handler {
		...
	}

with httpd.conf something like

	<Location /members>
		SetHandler perl-script;
		PerlAccessHandler +My::Gatekeeper;
		PerlHandler +My::Module;
	</Location>

the gatekeeper perlAccessHandler works like a charm; once
verification has taken place, we move on to the perlHandler
itself, and /var/log/apache/error.log says

[Thu May  3 17:20:50 2001] [error] Undefined subroutine &My::Module::handler called.

there's no syntax errors, but it's hard to check interactively
via "perl -d My/Module.pm" since there's much interrelation
between the perl code and apache server/request items.

here's my version info if it helps--

	$ cat /etc/debian_version
	2.2

	$ perl -MTie::DBI -MCGI::Cookie -MMD5 -MLWP::Simple \
		-MApache::File -MApache::URI -MApache \
		-e 'print map {s/.pm$//;s%/%::%g;"$_ => ".${$_."::VERSION"}."\n"} sort keys %INC'
	Apache => 1.26
	Apache::Connection => 1.00
	Apache::Constants => 1.09
	Apache::Constants::Exports => 
	Apache::File => 1.01
	Apache::Server => 1.01
	Apache::URI => 1.00
	AutoLoader => 
	CGI::Cookie => 1.20
	CGI::Util => 1.2
	Carp => 
	DBI => 1.13
	Digest::MD5 => 2.09
	DynaLoader => 1.03
	Exporter => 
	Fcntl => 1.03
	HTTP::Status => 1.26
	LWP::Simple => 1.34
	MD5 => 2.01
	Tie::DBI => 0.91
	mod_perl => 1.2103
	overload => 
	strict => 1.01
	vars => 

	$ apache -v
	Server version: Apache/1.3.9 (Unix) Debian/GNU
	Server built:   Apr 30 2000 12:54:24

is it just me? am i just lucky? or has anyone else had a
subroutine go hiding once the apache server is up?

-- 
DEBIAN NEWBIE TIP #30 from Wayne Topa <wtopa@dmcom.net>
:
Are you seeing GIBBERISH after viewing a binary file on your
console (or in an xterm/rxvt window)? Add this to your ~/.inputrc
file:
	"\033[[A": "reset\C-M"
Now when you need a quick tty reset, just press F1 at the command
prompt. Try "info rluserman" for more options.

Also see http://newbieDoc.sourceForge.net/ ...



Reply to: