Subject: | Error with prototypes |
Date: | Fri, 8 Aug 2014 15:31:25 +0300 |
To: | "bug-kavorka [...] rt.cpan.org" <bug-kavorka [...] rt.cpan.org> |
From: | ilmari ikonen <ilmari.ikonen [...] outlook.com> |
On Kavorka-0.030 and Perl 5.20 (Linux debian 3.2.0-4-686-pae #1 SMP Debian 3.2.60-1+deb7u1 i686 GNU/Linux) I get the error
Variable "$x" is not available at test.pl line 17
when executing the code:
use v5.14;use warnings;use Kavorka;
my $tf = sub { 1;};
sub test (&){ $_[0];}
my $a = test { my $x = $tf->(); fun(){ $x+$_[0]; }};
It works if sub is used instead of fun(). I'm not sure why this particular case should fail.