in reply to Re: Re: Re: Re: Re: mod_perl and objects
in thread mod_perl and objects

OK, here's a fully functional handler module that uses that syntax:

package TestHandler; use strict; use Apache::Constants qw(:common); sub handler : method { my($class, $r) = @_; $r->content_type('text/plain'); $r->send_http_header; $r->print( qq( Class: $class Perl: $] mod_perl: $Apache::VERSION ) ); return OK; } 1;

Here's the relevant httpd.conf entry:

<Location /test> SetHandler perl-script PerlHandler TestHandler </Location>

And here's the output:

Class: TestHandler Perl: 5.006001 mod_perl: 1.27