in reply to Code reference
Unfortunately, as soon as the script is called those functions are executed instead of just referenced. Here's an example
The code you posted does not do that, so its not an example
Any suggestions how to reference a function without calling it when the script is initialized?
In your real code check all instances of \& for a pair of ()
my $areference = \&function; ## wanna
my $called = \&function(); ## NOT wanna
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Code reference ( \¬ThisCall() )
by Lowry76 (Novice) on Aug 26, 2014 at 07:24 UTC | |
by davido (Cardinal) on Aug 26, 2014 at 14:43 UTC | |
by Anonymous Monk on Aug 26, 2014 at 07:25 UTC | |
by Anonymous Monk on Aug 26, 2014 at 07:26 UTC | |
by AnomalousMonk (Archbishop) on Aug 26, 2014 at 15:33 UTC |