Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
I want to be able to do this:
if ( wantarray(2) ) {
... }
Like caller, you could specify how many frames back you want to test. I find I need that at times when I'm refactoring. wantarray doesn't allow you to do this. However, in looking at the Want module, I've discovered that there is an undocumented function called want_uplevel. This may be exactly what I need!
caller() (Score:1)
You can use
(caller[2])[5], though it's not nearly as self-documenting.Re: (Score:2)
D'oh! That's particularly embarrassing since I'm the author of Perl6::Caller [cpan.org] and should know how it works :)