in reply to How can I use a module via a short name or alias?

If they're your packages to begin with you can always tell Exporter that you want to (conditionally) export them into use'ers namespace. If they're not yours (but you're determined to go mucking about in someone else's namespace anyhoo) there's always local *fbbq_scalar = \$Foo::Barista::Bazoo::Qux::the_scalar or something like the Lexical::Alias module. Or for more oop-y applications aliased might be relevant.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: How can I use a module via a short name or alias?
by Anonymous Monk on Feb 17, 2010 at 18:10 UTC

    Yes, in this case they're mine. However, in the general case, I want to:

    • use a module (which possibly has a Deeply::Nested::Package::Name),
    • not have any names dumped into my script's namespace (except the package I just used), and
    • be able to use the functions/variables in the module without having to type the Deeply::Nested::Package::Name every time.
    • Personally, I tend to prefer fully-qualifying names, otherwise I get confused where the name comes from.