Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Introspecting function signatures

by LanX (Saint)
on Mar 05, 2021 at 15:53 UTC ( [id://11129166]=note: print w/replies, xml ) Need Help??


in reply to Introspecting function signatures

Hi Gabor

The monastery's authority for such questions is dave_the_m and IIRC we already briefly talked about introspection here.

Regarding a (robust) API:

IIRC this is depending on the version of Perl, early versions compiled code into the function block to expand @_, later versions had dedicated OP-Codes for that. ( I could dig up that info from emails, if Dave doesn't show up)

so this could either boil down to inspecting the OP-Tree with B::Concise or calling a method from B (on a B::CV node most likely)

In any case, B::Deparse is written in Perl, so you can always look into it and diff different versions to locate how the info is extracted.

Whatever the result it would be nice if such an API was added to Sub::Util when it's not experimental anymore.

HTH :)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

PS: This message will self-implode ASA Dave shows up ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-25 18:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found