summaryrefslogtreecommitdiff
path: root/lib/version.t
diff options
context:
space:
mode:
Diffstat (limited to 'lib/version.t')
-rw-r--r--lib/version.t8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/version.t b/lib/version.t
index 7bce0ebbd9..da7a5fda07 100644
--- a/lib/version.t
+++ b/lib/version.t
@@ -96,9 +96,15 @@ like($@, qr/Invalid version object/,
eval { my $test = ($testobj > 1.0) };
like($@, qr/Invalid version object/,
"Bad subclass vcmp");
-strict_lax_tests();
+
+# Invalid structure
+eval { $a = \\version->new(1); bless $a, "version"; print "# $a\n" };
+like($@, qr/Invalid version object/,
+ "Bad internal structure (RT#78286)");
# do strict lax tests in a sub to isolate a package to test importing
+strict_lax_tests();
+
sub strict_lax_tests {
package temp12345;
# copied from perl core test t/op/packagev.t