The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
__END__
# NAME foo found where operator expected
myfunc 1,2,3
EXPECT
Number found where operator expected at - line 1, near "myfunc 1"
	(Do you need to predeclare myfunc?)
syntax error at - line 1, near "myfunc 1"
Execution of - aborted due to compilation errors.
########
# NAME foo found where operator expected (after strict error, w/fatal warnings)
use warnings FATAL => 'all';
use strict;
$foo;
myfunc 1,2,3
EXPECT
Global symbol "$foo" requires explicit package name (did you forget to declare "my $foo"?) at - line 3.
Number found where operator expected at - line 4, near "myfunc 1"
	(Do you need to predeclare myfunc?)
syntax error at - line 4, near "myfunc 1"
Execution of - aborted due to compilation errors.
########
# NAME (Missing operator before ${?) [perl #123737]
0${
EXPECT
Scalar found where operator expected at - line 1, near "0${"
	(Missing operator before ${?)
syntax error at - line 1, near "0$"
Missing right curly or square bracket at - line 1, at end of line
Execution of - aborted due to compilation errors.
########
# NAME (Missing operator before $#{?) [perl #123737]
0$#{
EXPECT
Array length found where operator expected at - line 1, near "0$#{"
	(Missing operator before $#{?)
syntax error at - line 1, near "0$#"
Missing right curly or square bracket at - line 1, at end of line
Execution of - aborted due to compilation errors.
########
# NAME Unterminated here-doc in string eval
eval "<<foo"; die $@
EXPECT
Can't find string terminator "foo" anywhere before EOF at (eval 1) line 1.
########
# NAME Unterminated here-doc in s/// string eval
eval "s//<<foo/e"; die $@
EXPECT
Can't find string terminator "foo" anywhere before EOF at (eval 1) line 1.
########
# NAME Unterminated here-doc in string
"${<<foo"; # Used to give ‘Attempt to free blah blah blah’
EXPECT
Can't find string terminator "foo" anywhere before EOF at - line 1.
########
# NAME Unterminated qw//
qw/
EXPECT
Can't find string terminator "/" anywhere before EOF at - line 1.
########
# NAME Unterminated q//
qw/
EXPECT
Can't find string terminator "/" anywhere before EOF at - line 1.
########
# NAME Unterminated ''
'
EXPECT
Can't find string terminator "'" anywhere before EOF at - line 1.
########
# NAME /\N{/
/\N{/
EXPECT
Missing right brace on \N{} or unescaped left brace after \N at - line 1, within pattern
Execution of - aborted due to compilation errors.
########
# NAME map{for our *a...
map{for our *a (1..10) {$_.=$x}}
EXPECT
Missing $ on loop variable at - line 1.
########
# NAME Missing name in "my sub"
use feature 'lexical_subs'; my sub;
EXPECT
The lexical_subs feature is experimental at - line 1.
Missing name in "my sub" at - line 1.
########
# NAME Missing name in "our sub"
use feature 'lexical_subs'; our sub;
EXPECT
The lexical_subs feature is experimental at - line 1.
Missing name in "our sub" at - line 1.
########
# NAME Missing name in "state sub"
use 5.01; use feature 'lexical_subs';
state sub;
EXPECT
The lexical_subs feature is experimental at - line 2.
Missing name in "state sub" at - line 2.
########
# NAME my sub pack::foo
use feature 'lexical_subs', 'state';
my sub foo::bar;
state sub foo::bear;
EXPECT
The lexical_subs feature is experimental at - line 2.
The lexical_subs feature is experimental at - line 3.
"my" subroutine &foo::bar can't be in a package at - line 2, near "my sub foo::bar"
"state" subroutine &foo::bear can't be in a package at - line 3, near "state sub foo::bear"
Execution of - aborted due to compilation errors.
########
# NAME Integer constant overloading returning undef
use overload;
BEGIN { overload::constant integer => sub {}; undef *^H }
1
EXPECT
Constant(1) unknown at - line 3, at end of line
Execution of - aborted due to compilation errors.
########
# NAME Float constant overloading returning undef
use overload;
BEGIN { overload::constant float => sub {}; undef *^H }
1.1
EXPECT
Constant(1.1) unknown at - line 3, at end of line
Execution of - aborted due to compilation errors.
########
# NAME Binary constant overloading returning undef
use overload;
BEGIN { overload::constant binary => sub {}; undef *^H }
0x1
EXPECT
Constant(0x1) unknown at - line 3, at end of line
Execution of - aborted due to compilation errors.
########
# NAME String constant overloading returning undef
use overload;
BEGIN { overload::constant q => sub {}; undef *^H }
'1', "1$_", tr"a"", s""a"
EXPECT
Constant(q) unknown at - line 3, near "'1'"
Constant(qq) unknown at - line 3, within string
Constant(tr) unknown at - line 3, within string
Constant(s) unknown at - line 3, within string
Execution of - aborted due to compilation errors.
########
# NAME Regexp constant overloading when *^H is undefined
use overload;
BEGIN { overload::constant qr => sub {}; undef *^H }
/a/, m'a'
EXPECT
Constant(qq) unknown at - line 3, within pattern
Constant(q) unknown at - line 3, within pattern
Execution of - aborted due to compilation errors.
########
# NAME \N{...} when charnames fails to load but without an error
# SKIP ? exists $ENV{PERL_UNICODE} ? "Unreliable under some PERL_UNICODE settings" : 0
BEGIN { ++$_ for @INC{"charnames.pm","_charnames.pm"} }
"\N{a}"
EXPECT
Constant(\N{a}) unknown at - line 2, within string
Execution of - aborted due to compilation errors.
########
# NAME Integer constant overloading returning undef
use overload;
BEGIN { overload::constant integer => sub {} }
1
EXPECT
Constant(1): Call to &{$^H{integer}} did not return a defined value at - line 3, at end of line
Execution of - aborted due to compilation errors.
########
# NAME Float constant overloading returning undef
use overload;
BEGIN { overload::constant float => sub {} }
1.1
EXPECT
Constant(1.1): Call to &{$^H{float}} did not return a defined value at - line 3, at end of line
Execution of - aborted due to compilation errors.
########
# NAME Binary constant overloading returning undef
use overload;
BEGIN { overload::constant binary => sub {} }
0x1
EXPECT
Constant(0x1): Call to &{$^H{binary}} did not return a defined value at - line 3, at end of line
Execution of - aborted due to compilation errors.
########
# NAME String constant overloading returning undef
use overload;
BEGIN { overload::constant q => sub {} }
'1', "1$_", tr"a"", s""a"
EXPECT
Constant(q): Call to &{$^H{q}} did not return a defined value at - line 3, near "'1'"
Constant(qq): Call to &{$^H{q}} did not return a defined value at - line 3, within string
Constant(tr): Call to &{$^H{q}} did not return a defined value at - line 3, within string
Constant(s): Call to &{$^H{q}} did not return a defined value at - line 3, within string
Execution of - aborted due to compilation errors.
########
# NAME Regexp constant overloading returning undef
use overload;
BEGIN { overload::constant qr => sub {} }
/a/, m'a'
EXPECT
Constant(qq): Call to &{$^H{qr}} did not return a defined value at - line 3, within pattern
Constant(q): Call to &{$^H{qr}} did not return a defined value at - line 3, within pattern
Execution of - aborted due to compilation errors.
########
# NAME Failed constant overloading should not cause a double free
use overload;
BEGIN { overload::constant q => sub {}; undef *^H }
undef(1,2);
undef(1,2);
undef(1,2);
undef(1,2);
undef(1,2);
undef(1,2);
undef(1,2);
undef(1,2);
undef(1,2);
"a"
EXPECT
Too many arguments for undef operator at - line 3, near "2)"
Too many arguments for undef operator at - line 4, near "2)"
Too many arguments for undef operator at - line 5, near "2)"
Too many arguments for undef operator at - line 6, near "2)"
Too many arguments for undef operator at - line 7, near "2)"
Too many arguments for undef operator at - line 8, near "2)"
Too many arguments for undef operator at - line 9, near "2)"
Too many arguments for undef operator at - line 10, near "2)"
Too many arguments for undef operator at - line 11, near "2)"
Constant(q) unknown at - line 12, near ""a""
- has too many errors.
########
# NAME Unterminated delimiter for here document
<<"foo
EXPECT
Unterminated delimiter for here document at - line 1.
########
# NAME my (our $x) errors
my (our $x);
EXPECT
Can't redeclare "our" in "my" at - line 1, at end of line
Execution of - aborted due to compilation errors.
########
# NAME our (my $x) errors
our (my $x);
EXPECT
Can't redeclare "my" in "our" at - line 1, at end of line
Execution of - aborted due to compilation errors.
########
# NAME state (my $x) errors
use feature 'state';
state (my $x);
EXPECT
Can't redeclare "my" in "state" at - line 2, at end of line
Execution of - aborted due to compilation errors.
########
# NAME our (state $x) errors
use feature 'state';
our (state $x);
EXPECT
Can't redeclare "state" in "our" at - line 2, at end of line
Execution of - aborted due to compilation errors.
########
# NAME my (my $x) errors
my (my $x, $y, $z);
EXPECT
Can't redeclare "my" in "my" at - line 1, at end of line
Execution of - aborted due to compilation errors.
########
# NAME our (our $x) errors
our ($x, our($y), $z);
EXPECT
Can't redeclare "our" in "our" at - line 1, near ", "
Execution of - aborted due to compilation errors.
########
# NAME state (state $x) errors
use feature 'state';
state ($x, $y, state $z);
EXPECT
Can't redeclare "state" in "state" at - line 2, near ", "
Execution of - aborted due to compilation errors.
########
# NAME BEGIN <> [perl #125341]
BEGIN <>
EXPECT
Illegal declaration of subroutine BEGIN at - line 1.