Jan 15, 2004 #1 mooniron Programmer Dec 15, 2002 26 TR Hi all. I am trying to get a reference to a subroutine in a module. But I can't. I am trying something like this: $my_var = \$my_module->sub_in_module; this assigns a scalar value in $my_var not a code reference. Could you help me what to do? Thanks
Hi all. I am trying to get a reference to a subroutine in a module. But I can't. I am trying something like this: $my_var = \$my_module->sub_in_module; this assigns a scalar value in $my_var not a code reference. Could you help me what to do? Thanks
Jan 15, 2004 #2 PaulTEG Technical User Sep 26, 2002 4,469 IE can your subroutine return the value your looking for? --Paul Upvote 0 Downvote
Jan 15, 2004 Thread starter #3 mooniron Programmer Dec 15, 2002 26 TR Yes it returns. But I just want to take the reference of that sub routine. Upvote 0 Downvote
Jan 15, 2004 #4 greadey Technical User Oct 25, 2001 231 GB Wouldn't \&My_Module::MySub return a reference? Upvote 0 Downvote