in reply to Re^3: Making each(@ary) work on 5.10?
in thread Making each(@ary) work on 5.10?

To override each for just a lexical scope is a much harder proposition.

ex::override maybe?

{ use ex::override 'each' => \&aeach; ... no ex::override 'each'; }

Replies are listed 'Best First'.
Re^5: Making each(@ary) work on 5.10?
by tobyink (Canon) on Jul 27, 2012 at 12:36 UTC

    I did look at ex::override, but each doesn't seem to show up in that grep on toke.c that they suggest, which seemed to suggest that ex::override would not work.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'