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.
Okay - that convinces me (Score:1)
I think Test::Most is now replacing my default use Test::More :-)
Re: (Score:2)
To be fair, I haven't actually added the default "show variable name" behavior yet. I've got to get the interface issues nailed down first :)
And why weren't you using it beforehand? I even bundle one of your modules [cpan.org] with it!
Re: (Score:1)
"And why weren't you using it beforehand"
Lazy - in the bad way.
Data::Dump (Score:1)
Yes! (Score:1)
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.