This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: Make Constant(%s) messages match reality
[perl5.git] / t / lib / croak / toke
CommitLineData
ca8ffed2 1__END__
5af08aed
FC
2# NAME Unterminated here-doc in string eval
3eval "<<foo"; die $@
4EXPECT
5Can't find string terminator "foo" anywhere before EOF at (eval 1) line 1.
6########
7# NAME Unterminated here-doc in s/// string eval
8eval "s//<<foo/e"; die $@
9EXPECT
10Can't find string terminator "foo" anywhere before EOF at (eval 1) line 1.
11########
ca8ffed2 12# NAME Missing name in "my sub"
e7d0b801 13use feature 'lexical_subs'; my sub;
ca8ffed2 14EXPECT
e7d0b801 15The lexical_subs feature is experimental at - line 1.
ca8ffed2 16Missing name in "my sub" at - line 1.
6f2d7fc9 17########
8767b1ab 18# NAME Missing name in "our sub"
e7d0b801 19use feature 'lexical_subs'; our sub;
8767b1ab 20EXPECT
e7d0b801 21The lexical_subs feature is experimental at - line 1.
8767b1ab
FC
22Missing name in "our sub" at - line 1.
23########
24# NAME Missing name in "state sub"
e7d0b801 25use 5.01; use feature 'lexical_subs';
8767b1ab
FC
26state sub;
27EXPECT
64fbf0dd 28The lexical_subs feature is experimental at - line 2.
8767b1ab
FC
29Missing name in "state sub" at - line 2.
30########
6f2d7fc9
FC
31# NAME Unterminated delimiter for here document
32<<"foo
33EXPECT
34Unterminated delimiter for here document at - line 1.