On Tue, Apr 24, 2012 at 10:10:16AM +0200, Johan Vromans wrote: > "Father Chrysostomos via RT" <perlbug-followup@perl.org> writes: > > Anyone who overrides if() is probably asking for trouble. > > But it would be nice to override length() and vec(). Where do we draw > > the line? > > Precisely <-- HERE. > Functions like vec() and length() can be overridden, but control > keywords like if and when and while can not. > > Writing it as if() doesn't make it similar to vec() or length(). The issue is that with the parser changes that have been happening recently (call_checker, call_parser, etc), there is getting to be less and less of a difference between these two cases (and ideally, at some point in the future, there won't be any difference at all). What about overriding something like map? The distinction isn't quite as clear as you seem to be implying. -doyThread Previous | Thread Next