in reply to eval code generation - parameters & return values

I have to agree with CountZero. There be dragons there. I stopped using string evals because they always find a way to come back and bite me. There are times when using a string eval is necessary, but it's not here. Here's a script that I did using Eval::WithLexicals.
#!/usr/bin/perl use autodie; use strictures 1; use Eval::WithLexicals; use Data::Dumper::Concise; my($x) = Eval::WithLexicals->new(); my $y = 3; my $z = 5; use strict 'refs'; eval { $x = $y + $z; return; }; print Dumper($x);