Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Sys::Syslog in OOP Module

by Zarathustra (Beadle)
on Aug 24, 2006 at 04:38 UTC ( [id://569286]=note: print w/replies, xml ) Need Help??


in reply to Re: Sys::Syslog in OOP Module
in thread Sys::Syslog in OOP Module

> Does your non-module use of syslog work on this same machine? What platform is it?

Many thanks for your continued assistance -- I'm at a loss...

But to o answer your question: Yes, it works as expected in non-oop-modules ( and I've been using Sys::Syslog in scripts for quite some time ), even on the same machine - which is a linux platform ( gentoo ).

While waiting for further assistance, I noticed that I had my:

use Sys::Syslog qw( :DEFAULT setlogsock );

_outside_ of the BEGIN block... so I figured that I should put that into a require into the BEGIN, because the BEGIN happens first:

BEGIN { require Sys::Syslog; Sys::Syslog->import( 'setlogsock', 'openlog', 'syslog', 'closelo +g' ); setlogsock( 'unix' ); openlog( 'IPScan', 'pid', 'local0' ); }

But that didn't appear to make a difference...

Replies are listed 'Best First'.
Re^3: Sys::Syslog in OOP Module
by Zarathustra (Beadle) on Aug 24, 2006 at 04:53 UTC

    Oh, man, I feel dumb...

    "Yes, it works as expected in non-oop-modules ( and I've been using Sys::Syslog in scripts for quite some time ), even on the same machine - which is a linux platform ( gentoo )."

    Lies.... all lies

    I went ahead and verified this ( which I obviously should have done first ), and no... it, in fact, did not work on the same machine in non-module'd code.

    So sorry for that, you're suspicion was exactly correct.

    By simply commenting out the 'setlogsock( 'unix' );', it all works as expected...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://569286]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-24 20:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found