Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Getting "close() on unopened filehandle FH" from Log::Log4perl

by kcott (Abbot)
on Jul 31, 2013 at 23:35 UTC ( #1047331=note: print w/ replies, xml ) Need Help??


in reply to Getting "close() on unopened filehandle FH" from Log::Log4perl

G'day glasswalk3r,

I see two issues here:

  1. In run(), you have "__PACKAGE->gimme_logger()". That should probably be "__PACKAGE__->gimme_logger()". [You may be across this information already but, in case you're not: __PACKAGE__ is described in "Special Literals" under perldata - Scalar value constructors; and Log::Log4perl - Pitfalls with Categories describes a caveat when using __PACKAGE__.]
  2. gimme_logger(), run() and DEMOLISH() all have "my $self = shift;" but none of them use $self.

-- Ken


Comment on Re: Getting "close() on unopened filehandle FH" from Log::Log4perl
Select or Download Code
Re^2: Getting "close() on unopened filehandle FH" from Log::Log4perl
by glasswalk3r (Pilgrim) on Aug 01, 2013 at 22:08 UTC

    Thanks Ken,

    I have already got the typo with __PACKAGE__, I'll update the node.

    Regarding the $self variable, gimme_logger() really does not need it, I'll update it as well. The other does use $self, but I haven't put all the code

    Alceu Rodrigues de Freitas Junior
    ---------------------------------
    "You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2014-04-25 09:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (586 votes), past polls