Re: Unary dot and custom control

2004-09-20 Thread Larry Wall
On Mon, Sep 20, 2004 at 07:25:14AM -0600, Luke Palmer wrote: : Perl 6 is making it easier to define custom block constructs like this : one. I worry about: : : method foo () { : preserve { : .bar; : } : } : : This one's a tad more subtle. Normally preserve's

Unary dot and custom control

2004-09-20 Thread Luke Palmer
I came across this slight annoyance working in Perl 5 today: sub preserve(&) {...} sub foo { preserve { $_[0]->bar; } } That didn't call "bar" on the invocant of "foo", but rather on "undef", because preserve's block was a hiding sub. Perl 6 is making it