in reply to Macro-envy, a snippet.
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.
|
|---|