in reply to Re: Getting rid of "new" (wrong target; perl6)
in thread Getting rid of "new"
Or you could just use aliased:
use aliased 'Long::Class::Name::For::Customer'; my $customer = Customer->new; use aliased 'Worker::Class::With::A::Long::Name' => 'Worker'; my $worker = Worker->new; use aliased 'Class::Name::With::Imports::For::Munger', Munger => @impo +rt_list; my $munger = Munger->new;
Or if you prefer lexicals:
use aliased; my $Customer = alias 'Long::Class::Name::For::Customer'; my $customer = $Customer->new;
This works well because the module author doesn't need to provide support for it. aliased pretty much works for any OO module.
Cheers,
Ovid
New address of my CGI Course.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Getting rid of "new" (aliased.pm)
by tye (Sage) on Jul 07, 2006 at 18:47 UTC | |
by bart (Canon) on Jul 07, 2006 at 19:19 UTC | |
by tye (Sage) on Jul 07, 2006 at 19:47 UTC | |
by xdg (Monsignor) on Jul 12, 2006 at 11:28 UTC | |
by Ovid (Cardinal) on Jul 08, 2006 at 10:58 UTC |