Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Refactoring: Soft-code class name in factory method

by dws (Chancellor)
on Apr 24, 2001 at 04:39 UTC ( [id://74924] : perlmeditation . print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      sub factory {
          my $self = shift;
          ...
    ...
          ...
          return $newInstance;
      }
    
  2. or download this
      sub factory {
          my $self = shift;
          ...
    ...
      sub factoryClass {
          "Bar"
      }