Author: timbo
Date: Wed Oct 25 04:15:24 2006
New Revision: 7975
Modified:
dbi/trunk/Changes
dbi/trunk/DBI.pm
dbi/trunk/t/40profile.t
Log:
Fixed t/40profile.t to be more insensitive to long double precision.
Changed to no longer inherit from Exporter thanks to jvanasco.
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Wed Oct 25 04:15:24 2006
@@ -4,15 +4,18 @@
=cut
-=head2 Changes in DBI 1.53 (svn rev XXX), XXX 2006
+=head2 Changes in DBI 1.53 (svn rev 7975), 25th October 2006
Fixed checks for weaken to work with early 5.8.x versions
Fixed DBD::Proxy handling of some methods, including commit and rollback.
+ Fixed t/40profile.t to be more insensitive to long double precision.
Fixed t/40profile.t to be insensitive to small negative shifts in time
thanks to Jamie McCarthy.
Fixed to work with current 'bleadperl' (~5.9.5) thanks to Steve Peters.
Users of Perl >= 5.9.5 will require DBI >= 1.53.
+ Changed to no longer inherit from Exporter thanks to jvanasco.
+
Added array context support to execute_array and execute_for_fetch
methods which returns executed tuples and rows affected.
Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm (original)
+++ dbi/trunk/DBI.pm Wed Oct 25 04:15:24 2006
@@ -9,7 +9,7 @@
require 5.006_00;
BEGIN {
-$DBI::VERSION = "1.52"; # ==> ALSO update the version in the pod text below!
+$DBI::VERSION = "1.53"; # ==> ALSO update the version in the pod text below!
}
=head1 NAME
@@ -120,7 +120,7 @@
=head2 NOTES
-This is the DBI specification that corresponds to the DBI version 1.52.
+This is the DBI specification that corresponds to the DBI version 1.53.
The DBI is evolving at a steady pace, so it's good to check that
you have the latest copy.
@@ -156,7 +156,8 @@
use Exporter ();
BEGIN {
[EMAIL PROTECTED] = qw(Exporter DynaLoader);
[EMAIL PROTECTED] = qw(DynaLoader);
+*import= \&Exporter::import; # avoid need to have Exporter in @ISA
# Make some utility functions available if asked for
@EXPORT = (); # we export nothing by default
Modified: dbi/trunk/t/40profile.t
==============================================================================
--- dbi/trunk/t/40profile.t (original)
+++ dbi/trunk/t/40profile.t Wed Oct 25 04:15:24 2006
@@ -20,7 +20,7 @@
}
}
-use Test::More tests => 46;
+use Test::More tests => 45;
$Data::Dumper::Indent = 1;
$Data::Dumper::Terse = 1;
@@ -87,7 +87,11 @@
} => 'DBI::Profile';
print "dbi_profile\n";
-my $t1 = DBI::dbi_time;
+# Try to avoid rounding problem on double precision systems
+# $got->[5] = '1150962858.01596498'
+# $expected->[5] = '1150962858.015965'
+# (looks like is_deeply stringifies) by treating as a string:
+my $t1 = DBI::dbi_time() . "";
dbi_profile($dbh, "Hi, mom", "my_method_name", $t1, $t1 + 1);
is_deeply sanitize_tree($dbh->{Profile}), bless {
'Path' => [ '!Statement', '!MethodName' ],
@@ -106,7 +110,7 @@
print "@$mine\n";
is_deeply $mine, [ 1, 1, 1, 1, 1, $t1, $t1 ];
-my $t2 = DBI::dbi_time;
+my $t2 = DBI::dbi_time() . "";
dbi_profile($dbh, "Hi, mom", "my_method_name", $t2, $t2 + 2);
print "@$mine\n";
is_deeply $mine, [ 2, 3, 1, 1, 2, $t1, $t2 ];