in reply to Re^2: Why do I get a "used only once" warning here?
in thread Why do I get a "used only once" warning here?
The OPer seems to want to control one-time printing/logging from outside the package/module
If one really wants a global in some other package, then...
package MyModule; use strict; use warnings; sub f { $MyApp::OneTime{+__FILE__.' '.__LINE__} ||= (print("logging\n"), 1 +); return(); } 1;
|
|---|