This used to fail with old V::M, add it to make sure it behaves under PP
Jason Kohles [Mon, 16 Feb 2009 22:33:25 +0000 (17:33 -0500)]
t/05-syntax-error.t [new file with mode: 0644]
t/lib/SyntaxError.pm [new file with mode: 0644]

diff --git a/t/05-syntax-error.t b/t/05-syntax-error.t
new file mode 100644 (file)
index 0000000..ee7178b
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+use Test::More tests => 1;
+
+eval { require "SyntaxError.pm" };
+like( $@, qr/\Asyntax error at /, 'Syntax Error reported correctly' );
diff --git a/t/lib/SyntaxError.pm b/t/lib/SyntaxError.pm
new file mode 100644 (file)
index 0000000..60a937a
--- /dev/null
@@ -0,0 +1,4 @@
+package SyntaxError;
+use namespace::clean;
+sub foo { if }
+1;