diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-05-01 18:54:38 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-05-01 18:54:38 +0000 |
commit | e8f84f558071a9089231d1926b6882ff7a9af9b8 (patch) | |
tree | 9d92839de4fd9c25d6146aa59da08770b2128a5a /t | |
parent | fdc0461adfbf64d9d5cd5e1968d937202c6992d6 (diff) | |
download | perl-e8f84f558071a9089231d1926b6882ff7a9af9b8.tar.gz |
Test for base.pm clobbering $VERSION.
p4raw-id: //depot/perlio@9935
Diffstat (limited to 't')
-rwxr-xr-x | t/lib/fields.t | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/t/lib/fields.t b/t/lib/fields.t index ae50df9ba6..b4b5cce4ca 100755 --- a/t/lib/fields.t +++ b/t/lib/fields.t @@ -90,7 +90,7 @@ my %expect = ( 'Foo::Bar::Baz' => 'b1:1,b2:2,b3:3,foo:4,bar:5,baz:6', ); -print "1..", int(keys %expect)+14, "\n"; +print "1..", int(keys %expect)+15, "\n"; my $testno = 0; while (my($class, $exp) = each %expect) { no strict 'refs'; @@ -183,3 +183,15 @@ package Test::Version; use base qw(No::Version); print "not " unless $No::Version::VERSION =~ /set by base\.pm/; print "ok ", ++$testno ,"\n"; + +# Test Inverse of $VERSION bug base.pm should not clobber existing $VERSION +package Has::Version; + +BEGIN { $Has::Version::VERSION = '42' }; + +package Test::Version2; + +use base qw(Has::Version); +print "#$Has::Version::VERSION\nnot " unless $Has::Version::VERSION eq '42'; +print "ok ", ++$testno ,"\n"; + |