Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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

by kcott (Chancellor)
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

Replies are listed 'Best First'.
Re^2: Getting "close() on unopened filehandle FH" from Log::Log4perl
by glasswalk3r (Friar) 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1047331]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2018-04-24 16:58 GMT
Find Nodes?
    Voting Booth?