Peter Corlett <ab...@cabal.org.uk> wrote: > I'd like to throw in the fun breakage caused by the combination of adding > two unnecessary bits of syntactic sugar to Perl. Somebody decided that > auto-deref would be nice, so you can do "each $hashref" and "pop $arrayref". > And then somebody else clearly huffed a bit too much PHP and decided that > hash operations should also work on arrays where possible, even if it > doesn't make sense.[0] Quick now, what does "each $foo" do, buried 94 levels > deep in the call stack of your Enterprise Quality Software?
I've heard that complaint before, and I honestly don't understand it. Among the reasons people use OO is so that the meaning of `$obj->meth` can be determined at run time, not compile time. If `each $x` is so confusing in Perl 5.14+ that it shouldn't be used "deep in the call stack", isn't that also true of method invocations? -- Aaron Crane ** http://aaroncrane.co.uk/