Apache-Perl: mod_perl error

Doran Barton fozz at iodynamics.com
Mon Feb 7 18:52:52 MST 2005

Not long ago, Ryan Nielsen proclaimed...
> Okay, I got my package to work, well partially.  I am making a call to 
> the package:
> package::sub( variable );
> But my variable doesn't seem to go through.  I get the error saying the 
> variable is undefined.  I am trying to assign it with shift, like:
> sub mySub {
> my $var = shift;
> }
> I'm positive the variable I am passing is defined.  Do I have to pass 
> the variable a specific way?

The problem here is that the package/object name is the implicit parameter.
This will work:

  sub mySub {
    my $class = shift;
    my $var = shift;

fozz at iodynamics.com is Doran L. Barton, president, Iodynamics LLC
Iodynamics: Linux solutions - Web development - Business connectivity
 "Eat your fingers off!"
    -- KFC's 'finger lookin good' as it was translated into Chinese
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://plug.org/pipermail/plug/attachments/20050207/84a76ec8/attachment.bin 

More information about the PLUG mailing list