in reply to Why do I get a "used only once" warning here?
Maybe something like the following would suffice:
package MyModule; my %OneTime; sub f { $OneTime{+__FILE__.' '.__LINE__} ||= (print("logging\n"), 1); return(); } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why do I get a "used only once" warning here?
by AnomalousMonk (Archbishop) on Mar 13, 2009 at 22:13 UTC | |
by ig (Vicar) on Mar 13, 2009 at 22:57 UTC | |
by rovf (Priest) on Mar 16, 2009 at 08:50 UTC |