Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Avoiding user-input in sub calls.

by runrig (Abbot)
on Nov 01, 2003 at 16:49 UTC ( [id://303817]=note: print w/replies, xml ) Need Help??


in reply to Avoiding user-input in sub calls.

Yet another way (OO style):
package Foo; sub one { ... } sub two { ... } sub AUTOLOAD { goto &one; } package main; # Then in your main routine Foo->$sub($data);
Doing it this way you'd have to first make sure that $sub is not one of the UNIVERSAL::* methods (can, isa, ??? -- update: or define your own 'can' and 'isa' which just goes to 'one').

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-04-23 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found