in reply to use Very::Long::Module::Name as Foo;
Your approach isn't transparent: references will be blessed into the shortname package. I chose to use constants in the other thread for this reason.
$ perl -MO=Deparse -e'Foo::Bar->new' 'Foo::Bar'->new; -e syntax OK $ perl -MO=Deparse -e'use constant FB => "Foo::Bar"; FB->new' use constant ('FB', 'Foo::Bar'); 'Foo::Bar'->new; -e syntax OK
Note how it compiles to exactly the same code. There is absolutely no chance that it will behave any differently than the original code in any case ever.
And while it may seem simple, your approach needs some very heavy weaponry to work. It is in gross violation of the "do the simplest thing that can possibly work" principle.
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: use Very::Long::Module::Name as Foo;
by liz (Monsignor) on Oct 15, 2003 at 08:58 UTC | |
Re: Re: use Very::Long::Module::Name as Foo;
by broquaint (Abbot) on Oct 15, 2003 at 09:18 UTC |
In Section
Meditations