Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: Factory Pattern

by merlyn (Sage)
on Jun 21, 2006 at 10:29 UTC ( [id://556620]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Cow;
    use base qw(Animal);
    __PACKAGE__->makes_sound_like('moo');
    ...
    
  2. or download this
    package Animal;
    sub makes_sound_like {
    ...
        $sound_registry{$sound} = $class;
      }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://556620]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-03-28 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found