in reply to Re: Sys::Syslog in OOP Module
in thread Sys::Syslog in OOP Module
> There are many ways to approach this - yours seems to be one reasonable method. >
Unfortunately, mine doesn't work! (c8=
I'm missing something regarding how the Sys::Syslog module ( or any similarly functioning module ) propagates its namespace/subroutines into another module/package.... obviously it works fine in a simple script environment who's package is main, however there apppears to be some "trick" I'm missing to get it available within another modules/packages namespace -- especially a class module such as the example.
I tried appending &main:: and FooClass:: to the syslog call ( in a feeble attempt to find the wherever Sys::Syslog imported its functions, but that didn't help either. )
> before you tried the magic of OO, how did you use syslog?
Well, I've been using perl's OOP for many, many years - both as a user and as a module builder. Not until now have I needed a module which I also wanted to have write to syslog. The way I used syslog in simple (non-oop) scripts has been exactly the way it's documented in its perldoc.
Cheers!
|
|---|