David Wheeler wrote:
On Jan 4, 2005, at 2:47 PM, Bruce J Keeler wrote:

I've always felt that this one should have a lowercase name, since it's
rather pragma-ish.  Are pragmas allowed outside of the core Perl
distribution?  Maybe it should be submitted as a core pragma, actually.
It's a really lightweight beast, and very useful.  Would certainly get
my vote.


I agree that it should be lowercased; yes, there are modules on CPAN that look like pragmas (such as only). I personally would prefer, however, that the name tell me that it's doing something more than loading a class; "class" and "module" don't do that. Here are some other options:

* alias (too close to "Aliased"?)
* nickname
* moniker
* pseudonym
* aka
* anonym
* handle (not a file handle, though, might be confusing)
* label
* term
* shortcut

I kind of like "aka", actually. But nickname, moniker, and shortcut are all good, too.

There is Package::Alias[1]. Does the same thing, but I haven't used it.

I like the idea of it being a pragma; 'aka' seems kinda perlish.

It'd be nice if this was supported in perl, so it would be possible to alias entire namespaces

use aka 'Apache2::Apache::' as 'Apache::';  # ;-)

Which would all all modules in the first namespace to be addressed as if they were in the second, including munging %INC so it does the right thing.


1. <http://search.cpan.org/dist/Package-Alias/>



Reply via email to