My only quibble is that alias is 'less cumbersome' than aliased---sadly
already used...

--hsm
p.s. nice idea!!

> -----Original Message-----
> From: Ovid [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 1:49 PM
> To: [email protected]
> Subject: Module naming advice
> 
> Hi all,
> 
> I'm about to release "Aliased" to the CPAN.  Yeah, it's a root level
> name, but it will soon become clear why it needs to be short.
> 
> SYNOPSIS:
> 
>   use Aliased 'Really::Long::Module::Name';
>   use Aliased 'Really::Long::Conflicting::Module::Name' as "MName";
>   use Aliased 'Another::Silly::Example' import => [qw/foo bar baz/];
> 
>   # my $name = Really::Long::Module::Name->new;
>   my $name = Name->new;
> 
>   # my $mname = Really::Long::Conflicting::Module::Name->new
>   my $mname = MName->new;
> 
>   # my $wibble = Another::Silly::Example->constructor.
>   my $wibble = Example->constructor;
> 
> Basically, when you have long package names, it can be cumbersome to
> retype the package name all the time.  This module allows you to skip
> that if the subroutines are called as methods.  It exports a subroutine
> into your namespace that is the desired alias for the module.  Having
> used something similar in a large system, I found that having this
> feature became quite addictive.
> 
> Since this affects compile-time behavior, it seemed more appropriate to
> think of this as a pragma and have "use aliased" but I know that some
> frown on that (of course, Ingy released "only" and I didn't hear any
> complaints.)
> 
> Is "Aliased" a good name?  Is "aliased" better?  Am I overlooking
> anything?
> 
> Cheers,
> Ovid
> 
> =====
> Silence is Evil
> http://users.easystreet.com/ovid/philosophy/decency.html
> Ovid                       http://www.perlmonks.org/index.pl?node_id=17000
> Web Programming with Perl  http://users.easystreet.com/ovid/cgi_course/

Reply via email to