in reply to Re^3: Invoking a string reference to a anonymous subroutine
in thread Invoking a string reference to a anonymous subroutine
Anyway I am getting the impression I am trying to bend the language to something it was not designed to do.my $_parse_handler = sub { my $self = shift; my $function = shift . '0'; # installed handlers my $_parse_element_configuration0 = $_parse_element_configuration; my $_parse_element_machines0 = $_parse_element_machines; eval "\$$function"; }; [...] my $handler = $self->$_parse_handler("_parse_element_" . $element->nam +e() ); $self->$handler($element);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Invoking a string reference to a anonymous subroutine
by LanX (Saint) on Jan 15, 2014 at 13:26 UTC |