in reply to Module Naming Dilemma
How about coding like this?
our $Customer = 'My::Company::Namespace::Customer'; our $Preferred = 'My::Company::Namespace::Customer::Preferred'; my $cust = $Customer->new; my $pref = $Preferred->new;
This isn't too bad from a usability perspective. It requires no cleverness to get the correct first arguemnt to the two new subs. It might make updating your code to use a subclass a little easier.
Variations on this idea: a constant. Or a sub that decides at runtime which classname to return.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Module Naming Dilemma
by jdporter (Paladin) on Jan 05, 2005 at 21:59 UTC | |
Re^2: Module Naming Dilemma
by ihb (Deacon) on Jan 22, 2005 at 17:54 UTC |
In Section
Seekers of Perl Wisdom