On Wed, 9 May 2007, A. Pagaltzis wrote:
Delegation means that the caller communicates only with the
object that delegates and doesn’t know which object does the
actual work. That’s not what’s happening in your example.
Something like this would be delegation:
sub trail_length {
my $self = shift;
$self->breadcrumbs->trail_length;
}
Here the caller talks only to VegGuide::Response and doesn’t even
know that there’s a VegGuide::Breadcrumbs object behind the scene.
Doh, good point.
I think there's a name for tha pattern I'm using, but I can't remember it
or find a good reference online.
Regardless, the pattern I'm using is often a good alternative to
_just_ subclassing.
-dave
/*===================================================
VegGuide.Org www.BookIRead.com
Your guide to all that's veg. My book blog
===================================================*/
_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/