On 10/05/2007, at 1:51 AM, Dave Rolsky wrote:

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.

I think there's a name for tha pattern I'm using, but I can't remember it or find a good reference online.

Would that be the factory method pattern?

http://en.wikipedia.org/wiki/Factory_method_pattern

--
Adam Clarke
www.strategicdata.com.au




_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to