"Bad name after %s" parsing error
p4raw-id: //depot/perl@27517
}
require "./test.pl";
-plan( tests => 56 );
+plan( tests => 58 );
eval '%@x=0;';
like( $@, qr/^Can't modify hash dereference in repeat \(x\)/, '%@x=0' );
like($@, qr/That use of \$\[ is unsupported/,
'cannot assign list of <1 elements to $[');
}
+
+# tests for "Bad name"
+eval q{ foo::$bar };
+like( $@, qr/Bad name after foo::/, 'Bad name after foo::' );
+eval q{ foo''bar };
+like( $@, qr/Bad name after foo'/, 'Bad name after foo\'' );