- or download this
package Lambda;
...
}
1;
- or download this
use strict;
use warnings;
...
my $f = lambda($x => sub { $x });
is($f->('test'), 'test', 'tied');
}
- or download this
1..10
ok 1 - use Lambda;
...
# got: undef
# expected: 'test'
# Looks like you failed 2 tests of 10.
- or download this
package Lambda;
...
}
1;
- or download this
use strict;
use warnings;
...
my $f = lambda { $_ };
is($f->('test'), 'test', 'tied');
}
- or download this
1..6
ok 1 - use Lambda;
...
ok 4 - restore
ok 5 - alias
ok 6 - tied