>>>>> "Steffen" == Steffen Mueller <[EMAIL PROTECTED]> writes:
Steffen> Okay, I admit to have relied on an overgeneralized interpretation of
Steffen> Randal's post about closures being a problem for B::Deparse.
Steffen> I *do*, however, remember B::Deparse failing to deparse some entries
Steffen> to the tpr04b golf contest which posed some trouble to my judging the
Steffen> entries. Those pieces of code qualify as pathological, I suppose. :)
Let's see if this is the one:
sub black_adder {
my $constant = shift;
sub { $constant + shift; }
}
my $to_deparse = black_adder(42);
use B::Deparse;
print "\n", B::Deparse->new->coderef2text($to_deparse), "\n";
==>
{
$constant + shift(@_);
}
Ayup. That's the one. *What* constant? :) And that was the
first odd one I tried. I could probably construct weirder ones
once that one is fixed.
So, coderefs that have been closed, break.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!