The simple solution is to stop calling a subroutine as a method and just use: Input::awesome;.
Or, if awesome really is a method, then invoke it via a reference blessed into the class 'Input':
$o = bless , 'Input';; ... $o->awesome;; Yay!
Or, as you've pointed out, use lexicals.
Bottom line: stop going out of your way to artificially create problems.
|Replies are listed 'Best First'.|
Re^2: Prevent Strings From Being Interpreted As A File Handle
by amon (Beadle) on Apr 27, 2014 at 11:54 UTC
by BrowserUk (Pope) on Apr 27, 2014 at 12:39 UTC