I thought the first case was a closure variable. i.e.
The thing is, I can only see how I might get the output of prototype into the string and not the closure. i.e.
my $original_proto = prototype("${package}::${sub_name}"); my $original_sub = \${"${package}::${sub_name}"}; *{"${package}::${sub_name}"} = sub HOW_DO_I_GET_$original_proto_IN_HER +E? { return $original_sub->(@_); };
my $original_proto = prototype("${package}::${sub_name}"); my $original_sub = \${"${package}::${sub_name}"}; *{"${package}::${sub_name}"} = eval qq{sub $original_proto { return \$ +original_sub->(\@_); } };
Am I missing something obvious?
In reply to Re^6: Monkey patching all subs with a basic 'starting subname' message
by Anonymous Monk
in thread Monkey patching all subs with a basic 'starting subname' message
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |