SPUG: mod_perl/apache questions!!

Fred Morris m3047 at inwa.net
Thu May 12 10:07:02 PDT 2005


.pm files are generally classes, although they can be subroutine libraries
as well. Perl's OO paradigm is pretty simple: if you call something as
$object->foo() or Object_Class->foo() the object or the classname are
passed to foo() as the first parameter.. as long as the object has been
blessed. Grep for 'bless'. If no bless, then it's a subroutine library;
then look for -i 'export'.

.pm files are generally included into some main proggie with use or
require. There is a notion of class persistence; if you're running
mod_perl, that persistence stays for the lifetime of the worker AFAIK, and
you have to restart apache to get them to reload.

Using warn or carp to make the code chatty is the low tech way to debug.
There are others (you can get really fancy if you care to).

If you use CGI.pm, then if you call the main cgi with perl -d it will ask
you for the parameters in a syntax which predates YAML.

At 9:43 AM 5/12/05, bruce wrote:
>[...]
>know if there's someone i can talk to about how to debug the app.

The address at the bottom of this message requires "I-ACK" on the subject
or from lines..

>the app uses .pm files as well as .bml (which is a kind of perlish markup
>language) files. my primary issue is how do i add a subroutine to the .pm
>file (which seems to get intergated into apache during startup) such that i
>can use the subroutine in other functions...

--

Fred Morris
fredm3047 at inwa.net (I-ACK)




More information about the spug-list mailing list