in reply to Re: Invoking a string reference to a anonymous subroutine
in thread Invoking a string reference to a anonymous subroutine
Hi there,
thanks for your replies.
I have tried the third approach by Lanx, but the program returns the following error:
Kind regards,
s.fox
p.s. my Perl version is 5.10, could it be involved?
thanks for your replies.
I have tried the third approach by Lanx, but the program returns the following error:
My code is :Variable "$_parse_element_configuration" is not available at (eval 8) +line 2. Use of uninitialized value in subroutine entry at Configuration.pm lin +e 64.
Where is the problem?my $_parse_element_configuration = sub{ ... } sub _handler{ my $function_name = shift; eval "\$$function_name"; }; [...] # invoking the handler _handler("_parse_element_configuration")->($self, $element);
Kind regards,
s.fox
p.s. my Perl version is 5.10, could it be involved?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Invoking a string reference to a anonymous subroutine
by LanX (Saint) on Jan 15, 2014 at 11:24 UTC | |
by Superfox il Volpone (Sexton) on Jan 15, 2014 at 12:48 UTC | |
by LanX (Saint) on Jan 15, 2014 at 13:26 UTC |
In Section
Seekers of Perl Wisdom