From: Martin Becker (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-7948-
1182185333-640.43242-75-0@perl.org>
plus a test case
p4raw-id: //depot/perl@31420
use strict 'vars';
use vars qw($VERSION);
-$VERSION = '2.09';
+$VERSION = '2.10';
# constant.pm is slow
sub SUCCESS () { 1 }
sub has_fields {
my($base) = shift;
my $fglob = ${"$base\::"}{FIELDS};
- return( ($fglob && *$fglob{HASH}) ? 1 : 0 );
+ return( ($fglob && 'GLOB' eq ref($fglob) && *$fglob{HASH}) ? 1 : 0 );
}
sub has_version {
#!/usr/bin/perl -w
use strict;
-use Test::More tests => 11;
+use Test::More tests => 12;
use_ok('base');
'Base class empty error message');
}
+
+package Schlozhauer;
+use constant FIELDS => 6;
+package Basilisco;
+eval q{ use base 'Schlozhauer' };
+::is( $@, '', 'Can coexist with a FIELDS constant' );