NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Yes! (Score:1)
Reply to This
Re: (Score:2)
Surprise! It's done without a source filter :) It uses Data::Dumper::Names which, in turn, uses PadWalker to fetch the variable names. Test::Most 0.20_01 [cpan.org] has a developer implementation. Already I have a couple of issues.
First, since Data::Dumper::Names 0.03 is only recommended and not required, one test fails sporadically. My bad :) Also, because this uses PadWalker, this shows us as $VAR1 instead of the variable name:
That's because $@ is not a lexical. I don't know how to get around that,
Re: (Score:1)
I wonder if it’s possible to find your caller’s op tree and find your call site in it, then isolate the parameter expression and deparse it… that would be a rock solid approach.
But I don’t know if the Perl introspection stuff is quite up to that level at this point.