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

Re^3: Using import to generate subroutines

by BUU (Prior)
on Nov 24, 2004 at 06:37 UTC ( [id://410062]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Using import to generate subroutines
in thread Using import to generate subroutines

PL/SQL procedures can have characters in them that are not allowed for Perl subroutines, most importantly a dot.
Actually, this is wrong =]. To demonstrate:
*{"dbms_random.random"} = sub { print "I am dbms_random.random\n" } "dbms_random.random"->();
I have no idea what practical use this has, but I thought you should know!

You might want to consider just exporting a hash of functions. That way all the functions are in one place for easy listing and so forth and you don't have to worry about mapping subroutine names, as hash keys can contain any character (which is why the subroutine definition code above works..)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-24 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found