All the Perl that's Practical to Extract and Report

Navigation

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

That doesn't really help too much. Want.pm can't distinguish between the different objects that could be wanted, getting a program to think metacognitively at that complexity is impossible. (If you've invented AI *that* good, Terminator 3 will soon become a reality...)

I could be wanting the object returned by $object->head, because you've made the head into its own greater object to allow for more methods, or I could want the object to be a chained method. How can you tell the difference? How can a maintanance programmer tell the difference? The problem with method chaining is that an idiom manifests itself in the same form as the standard, and that they stand for two completely different things. The contexts, for all intents and purposes, look _exactly_ the same. For a reader to read the documentation and check each method to see whether its chained, or can actually be returning a real object outweighs the gains created by a little extra brevity, and having all your manipulations of an object done at one time.