Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: "Dynamic" dispatch tables

by elTriberium (Friar)
on Apr 29, 2011 at 20:26 UTC ( [id://902069]=note: print w/replies, xml ) Need Help??


in reply to Re: "Dynamic" dispatch tables
in thread "Dynamic" dispatch tables

You're right, I'm not sure yet if I really need a hash. I'll have to figure out some of the details.

I also already started using the "not exists" part, but running into a problem with that: I want to move the setup of the dispatch table / array into a module, but in the module the "exists &{"tcid_$_"} always fails as the sub is not defined in this module. Is there a good workaround for this?

Replies are listed 'Best First'.
Re^3: "Dynamic" dispatch tables
by Tanktalus (Canon) on Apr 29, 2011 at 20:55 UTC
    Yes. What package will they be in? If they'll be in the Foo package, then just use exists &{"Foo::tcid_$_"} instead. :-)
      They won't be in any package, but in the .pl script. I got it to work by using "main::", thanks for the hint.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-23 07:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found