Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Dynamic Method Calls

by runrig (Abbot)
on Aug 28, 2001 at 01:23 UTC ( [id://108275]=note: print w/replies, xml ) Need Help??


in reply to Dynamic Method Calls

So my question is the following: Is there some way I can get method behavior (looking though the namespaces in the @ISA package) when I don't know the name of the method until runtime? Or do I have to look through the @ISA array myself?

That's what AUTOLOAD is for. Check out perldoc perltoot.

Replies are listed 'Best First'.
Re: Re: Dynamic Method Calls
by ton (Friar) on Aug 28, 2001 at 01:32 UTC
    err... yes. The reason I have the method as a string in the first place is that I am implementing an AUTOLOAD. I needed to know how to turn that string into a method call on an object; fortunately, dragonchild came through with one line of code. Props to him or her!
    -----
    Be bloody, bold, and resolute; laugh to scorn
    The power of man...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 01:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found