my @attr = map { my $type = $_; no strict 'refs'; map $self->${ \"stringify_$type" }( $op, $_ ), @{ "${type}_attributes" }; } qw( string number unhandled treeorder execorder );
use PadWalker qw( peek_my ); my @attr = map { my $type = $_; map $self->${ \"stringify_$type" }( $op, $_ ), @{ peek_my( 0 )->{ "\@${type}_attributes" } || [] }; } qw( string number unhandled treeorder execorder );
Hi, my name is Aristotle, and I’m a hack value addict.
Makeshifts last the longest.
In reply to Re: Macro-envy, a snippet.
by Aristotle
in thread Macro-envy, a snippet.
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |