in reply to Why do I get a "used only once" warning here?
Is it that important that there be only one variable for the entire application? Why not just
sub f { our $OnceOnly{+__LINE__} ||= (log(...),1); }
which would, ISTM, be largely equivalent (and somewhat simpler), but with no risk of warnings?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why do I get a "used only once" warning here?
by rovf (Priest) on Mar 16, 2009 at 08:46 UTC |