doesn't understand the role of shift and bless, completely; where we have greeting and repeat are being shift.package Greet::Repeat; sub new { my $class = shift; my $self = { greeting => shift, repeat => shift, }; return bless $self, $class; } sub greet { my $self = shift; print ($self->{greeting} x $self->{repeat}); } 1;
In reply to Re^4: Abstract Factory
by Khatri
in thread Abstract Factory
by Khatri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |