Subject: | use constant in Perl 5.6.1 |
Although this has been broken in Perl 5.6.1 for quite some time, I've only just realised why. Your use of 'use constant' doesn't work in 5.6.1, and as a consequence you get test failures for every single test. The attached patch fixes this.
In addition your diag() line is completely meaningless, and gives false information. Regardless of what Perl version or platform you're using it always will print "Perl 5.008006, /usr/local/bin/perl" at the end. A better indicator is to print the actual Perl version being used for testing and the platform. I'm not sure how you print the directory path for the perl interpreter as on Windows the default is 'C:\Perl\bin', but it could be anywhere. Attached patch applies Perl version and platform.
--- Class-DBI-FormBuilder-0.47/lib/Class/DBI/FormBuilder.pm Mon Sep 26 10:44:42 2005
+++ Class-DBI-FormBuilder-0.47_01/lib/Class/DBI/FormBuilder.pm Mon Nov 21 15:52:43 2005
@@ -10,7 +10,11 @@
use UNIVERSAL::require;
-use constant { ME => 0, THEM => 1, FORM => 2, FIELD => 3, COLUMN => 4 };
+use constant ME => 0;
+use constant THEM => 1;
+use constant FORM => 2;
+use constant FIELD => 3;
+use constant COLUMN => 4;
use base 'Class::Data::Inheritable';
--- Class-DBI-FormBuilder-0.47/t/00-load.t Mon Sep 26 10:44:42 2005
+++ Class-DBI-FormBuilder-0.47_01/t/00-load.t Mon Nov 21 15:44:30 2005
@@ -6,4 +6,4 @@
use_ok( 'Class::DBI::FormBuilder' );
}
-diag( "Testing Class::DBI::FormBuilder $Class::DBI::FormBuilder::VERSION, Perl 5.008006, /usr/local/bin/perl" );
+diag( "Testing Class::DBI::FormBuilder $Class::DBI::FormBuilder::VERSION, Perl $], $^O" );