Ok... can someone give me a clue about the issue of variable scoping?  I
have a program that uses a logging module (Log::LogLite), and so I have an
object $log that has a ->write method. I have a few custom packages that I
wrote that I want to be able to also write to the logfile.  What is the
syntax to be able to pass this object into the subroutines in my package?

I tried not doing anything and hoping there was magic in having it defined
in the parent module... nope.
        $log->write("Got Here");

I tried scoping the variable to the parent by calling it
parent::$log->write... no luck.
        parent::$log->write("Got Here");

I tried passing the object as a parm to the subroutine... that didn't work.
        my($log) = @_;
        $log->write("Got Here");

So... anyone got any suggestions for a perl newby?

Thanks,

Mike

Reply via email to