NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
I don't get it (Score:1)
Re: (Score:2)
It's a question of encapsulation. Imagine that the Salesman class no longer has need of a manager accessor, but you still need to know which office the salesman is with. You might get a office method pushed into the Salesman class. Then, every place where you have the above code needs to be changed to:
If that's called a lot, it can be a maintenance nightmare.
However, what if you have this?
Re: (Score:1)
Thank you. I hadn’t realized Moose’s powerful delegation mechanisms we’re more than handy shortcuts. This provides an excellent use case for them.
For those who don’t know Moose every attribute object can have a handles er … attribute … so the example here can be defined like:
Re:I don't get it (Score:1)
Reply to This
Parent