Skip to content

Commit

Permalink
failing test - closures are broken
Browse files Browse the repository at this point in the history
  • Loading branch information
tobyink authored and doy committed Jul 30, 2013
1 parent c81519e commit 38482e7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions t/close-over-nonref.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;

use Eval::Closure;

my $number = 40;
my $closure = eval_closure(
source => 'sub { $xxx += 2 }',
environment => { '$xxx' => \$number },
);

$closure->();

is($number, 42);

done_testing;

0 comments on commit 38482e7

Please sign in to comment.