This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
‘Subroutine "&x" is not available’ during compilation
authorFather Chrysostomos <sprout@cpan.org>
Thu, 6 Sep 2012 23:03:20 +0000 (16:03 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 16 Sep 2012 05:45:07 +0000 (22:45 -0700)
commit4e85e1b4de5848696dc021f24d071090d387fe70
treeaf3eb30b733bcf0c6650f5976e4ed27798c4e0c2
parent9ccc915ef51db520896c2ca075446d61eaef1870
‘Subroutine "&x" is not available’ during compilation

sub {
  my $x;
  sub { eval '$x' }
}->()()
__END__
Variable "$x" is not available at (eval 1) line 2.

That one’s OK (though I wonder about the line number).

sub {
  my sub x {};
  sub { eval '\&x' }
}->()()
__END__
Variable "&x" is not available at (eval 1) line 1.

That should say ‘Subroutine’.
pad.c
pod/perldiag.pod
t/cmd/lexsub.t
t/porting/diag.t