in reply to Re: sub getting reference to itself : generic way
in thread sub getting reference to itself : generic way

Oooh, that uses PadWalker. Well, that should work, but I wouldn't go as far as calling that "generic".
  • Comment on Re^2: sub getting reference to itself : generic way

Replies are listed 'Best First'.
Re^3: sub getting reference to itself : generic way
by Limbic~Region (Chancellor) on Jun 18, 2004 at 17:01 UTC
    Joost,
    *Chuckle* - I will share a snippet of the CB conversation I had along those lines:
    • Corion Seems like calin wants something like caller(-1) ... I wonder more about caller(-2) though - now that would be a feature of Perl to make other languages envious :-)
    • Limbic~Region was just reading that Corion
    • Corion Hmm - no, caller(0) does almost everything calin wants, except that it only returns a name not a reference ... But why should caller be restricted to non-negative numbers ? :-))))
    • Limbic~Region *shrug* - I am betting someone comes up with a B:: solution or something though the question looked to be asking for something generic
    • Limbic~Region does Devel::Caller fill in the missing code ref?
    • Corion Limbic~Region++ indeed!
    • Zaxo suspects diotalevi will come up with something clever and wicked
    Note: Quotes used with permission

    Cheers - L~R