Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Changing the name of a function in the call stack

by Corion (Patriarch)
on Nov 19, 2021 at 17:51 UTC ( [id://11138950]=note: print w/replies, xml ) Need Help??


in reply to Changing the name of a function in the call stack

See for example Sub::Name.

I thought there was a special variable to set the name of the current subroutine, but I don't find it. So Sub::Name is the most likely candidate here.

  • Comment on Re: Changing the name of a function in the call stack

Replies are listed 'Best First'.
Re^2: Changing the name of a function in the call stack
by kikuchiyo (Hermit) on Nov 19, 2021 at 18:13 UTC

    Excellent, thanks!

    (I looked at the XS source of that module - wow, that looks extremely complicated.)

      Also have a look at Sub::Util (set_subname()) which is included with Perl since v5.21.4.

      A new module, Sub::Util, has been added, containing functions related to CODE refs, including subname (inspired by Sub::Identity) and set_subname (copied and renamed from Sub::Name). …

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-04-19 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found