IMO, that indicates a very poor application design.
Unfortunately I don't have access to the code from these modules, nor do I have permissions to change them. There is no dispatch table available to list all the subroutines. To make things extra fun they randomly decide to add in new subs/take them out, without telling anyone. So it's very dynamic and mostly a guessing game.
I guess my issue is, this is the situation I have to deal with. People are going to pass me over the cli, subroutines they want called. I can get those subs as scalars, and then I need to call them. That's pretty much all I have to work with.
One other option I have is I could write a script to go in and grab their code myself and find what all subroutines are available and then populate the hash table myself, but I've got to be honest I'm worried that it will make the program really slow. In particular, it seems like I'd need to do that every time one of the objects I'm working with is instantiated. If instead I could just call the sub as it's passed on the cli rather than having to go in and populate a dispatch table every single time, it would be preferrable.
Yeah, when I put that in the eval, it still fails as a syntax error. I don't know maybe I've hit a roadblock.
EDIT: I see your post, so what you're doing is making the string the entire call, like $obj->sub(); . Ok, I see what I was doing wrong, I was just having the subroutine call itself as a string and calling that. I'll try it this way.
Thanks for all the help I've been really frustrated!
(This post was edited by perlFun on Aug 21, 2013, 5:37 PM)