--- Sam Vilain <[EMAIL PROTECTED]> wrote:
> However, this code reads very well:
> 
>   use module 'Foo::Bar' as 'Bar';
>   use package 'Foo::Bar' as 'Bar';

'package' is a reserved word, so I won't use that.  'module' is worse
than 'class' because 'class' at least let's us know that this pragma is
only for OO modules.
 
> And this does not read as well (at least, in English):
> 
>   use aka 'Foo::Bar' as 'Bar';

Yeah, I really don't like it.

> My suggestion;
> 
>   use aliasing to 'Bar', 'Foo::Bar';
> 
> With the upside that "aliasing" also clearly states what the module
> does.

That fails because it makes the common case more difficult:

  use aliasing "Really::Long::Class:Name";
  # or 
  use aliasing "Really::Long::Class:Name", as => "CName";

However, I do like the name "aliasing.pm"  Anyone else?  It's not
perfect, but the one that reads the most naturally "class", seems to
not be favored by people.

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