Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: how to call a sub via variable in library

by Anonymous Monk
on Nov 17, 2014 at 19:33 UTC ( [id://1107466]=note: print w/replies, xml ) Need Help??


in reply to Re: how to call a sub via variable in library
in thread how to call a sub via variable in library

I've been staring at this unholy construct $self->{&{\&{$testname}}}->($system); for about 15 minutes, And I still haven't a clue what it's meant to do.
This is a very obscure and useless feature of Perl. Documented in strict
$bar = \&{'foo'}; &$bar;
is allowed so that "goto &$AUTOLOAD" would not break under stricture.

Replies are listed 'Best First'.
Re^3: how to call a sub via variable in library
by BrowserUk (Patriarch) on Nov 17, 2014 at 19:46 UTC

    That bit is obfuscated, but at least understandable.

    It's the invoking of a subroutine from the object hash keyed by the return code of that subroutine that I find completely unlikely.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found