Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^3: Module Naming Dilemma

by tilly (Archbishop)
on Jan 05, 2005 at 08:03 UTC ( [id://419541]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Module Naming Dilemma
in thread Module Naming Dilemma

I hope that you've documented (and possibly checked!) that your aliases can't contain things like :: in them.

If I didn't know how it was implemented, I could easily see myself being bitten by that.

(Note: I happen to agree with Perrin's response in your diary. I happen to dislike the idea and wouldn't use it. But then again, I don't have to.)

Replies are listed 'Best First'.
Re^4: Module Naming Dilemma
by Ovid (Cardinal) on Jan 05, 2005 at 16:05 UTC

    I don't understand. Why can't they have "::" in them? This works:

    use aka "Really::Long::Module::Name", as => "R::Name"; my $foo = R::Name->some_class_method;

    However, messing with someone else's namespace is a really bad idea and it is documented that the programmer shouldn't do that.

    Cheers,
    Ovid

    New address of my CGI Course.

      I was assuming that you were just assigning to a typeglob to get the function created, in which case the appropriate typeglob manipulation would either put that in the wrong package or would need extra logic.

      I guess that you either did it differently than I expected, or you have the necessary extra logic.

        I didn't do the typeglob trick because putting things into other packages breaks stuff. I just create a sub that returns the package names (there's more than that, but not much.)

        Cheers,
        Ovid

        New address of my CGI Course.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-19 22:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found