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

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]
[choroba]: that's 2012
[zentara]: I just acquired a computer with the card type, and wondered if it was best to stick with the open-source code or use NVIDIA's proprietary code
[zentara]: do you feel good about a non-open-source code, being in control of your display functions?
[choroba]: If you're not going to play 3d games on it, using the open source driver should be enough
[zentara]: choroba that is true, and the wise choice, but I want to see how fast I can get fglrx3dspheres to run... just as an intellectual challenge :-)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-05-26 14:02 GMT
Find Nodes?
    Voting Booth?