http://qs321.pair.com?node_id=228402


in reply to Why isn't ->can() curried?

Would the behaviour be something like this
use strict; use warnings; { my $old_can = *UNIVERSAL::can{CODE}; no warnings 'redefine'; *UNIVERSAL::can = sub { my($class,$method) = @_; my $ret = $old_can->($class, $method); return sub { warn "$class->$ret( @_ )\n"; $class->$ret( @_ ) }; }; } sub foo::bar { print "got: @_[1 .. $#_]\n"; } my $m = foo->can("bar"); $m->(qw(ichi ni san shi)); __output__ foo->CODE(0x81080f8)( ichi ni san shi ) got: ichi ni san shi
Or something else perhaps?
HTH

_________
broquaint