Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^5: Dynamic Package Name & Subroutine Call

by ikegami (Pope)
on Dec 17, 2012 at 13:06 UTC ( #1009161=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Dynamic Package Name & Subroutine Call
in thread Dynamic Package Name & Subroutine Call

That makes no sense. This isn't a change; can has never done the right thing for non-methods.


Comment on Re^5: Dynamic Package Name & Subroutine Call
Download Code
Re^6: Dynamic Package Name & Subroutine Call
by Anonymous Monk on Dec 17, 2012 at 13:10 UTC

    sure it has :)

    $ perl -le " sub fudge { 42 } print main->can(q/fudge/)->() " 42
      That has always searched main's inheritance tree in the case where &main::fudge didn't exist, and that's not the right thing for subs.

        That has always searched main's inheritance tree in the case where &main::fudge didn't exist, and that's not the right thing for subs.

        Sure, but setting up an inheritance tree for main is the bug :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2015-07-06 11:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (72 votes), past polls