Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re4: use Very::Long::Module::Name as Foo;

by dragonchild (Archbishop)
on Oct 14, 2003 at 17:48 UTC ( #299200=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Re: use Very::Long::Module::Name as Foo;
in thread use Very::Long::Module::Name as Foo;

Wouldn't you have to transform Foo::Bar::Baz to Foo/Bar/Baz.pm, to make it work with require?

------
We are the carpenters and bricklayers of the Information Age.

The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.


Comment on Re4: use Very::Long::Module::Name as Foo;
Re: Re4: use Very::Long::Module::Name as Foo;
by liz (Monsignor) on Oct 14, 2003 at 18:18 UTC
    No, because it is a source filter. It changes source such as:
    use Very::Long::Module::Name as Foo;
    to:
    BEGIN {*{"Foo::"} = \*{"Very::Long::Module::Name::"}}use Very::Long::M +odule::Name;
    essentially aliasing the stashes of the Foo namespace with the Very::Long::Module::Name namespace at compile time.

    So this is before anything is required under "use"s hood.

    Liz

Re: Re4: use Very::Long::Module::Name as Foo;
by tilly (Archbishop) on Oct 15, 2003 at 02:48 UTC
    Wouldn't you have to transform Foo::Bar::Baz to Foo/Bar/Baz.pm, to make it work with require?

    No. That was the point of the string eval.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://299200]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-07-12 11:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (239 votes), past polls