Author: timbo
Date: Mon Apr 19 08:46:33 2004
New Revision: 284

Modified:
   dbi/trunk/Changes
   dbi/trunk/ToDo
   dbi/trunk/lib/DBI/ProfileDumper.pm
   dbi/trunk/t/40profile.t
Log:
Fixed DBI::ProfileDumper new() docs thanks to Michael Schwern.
Assorted ToDo changes.


Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Mon Apr 19 08:46:33 2004
@@ -15,6 +15,7 @@
   Fixed last_insert_id(...) thanks to Rudy Lippan.
   Fixed propagation of scalar/list context into proxied methods.
   Fixed DBI::Profile::DESTROY to not alter [EMAIL PROTECTED]
+  Fixed DBI::ProfileDumper new() docs thanks to Michael Schwern.
 
   Changed selectall_arrayref() to call finish() if
     $attr->{MaxRows} is defined.

Modified: dbi/trunk/ToDo
==============================================================================
--- dbi/trunk/ToDo      (original)
+++ dbi/trunk/ToDo      Mon Apr 19 08:46:33 2004
@@ -13,8 +13,7 @@
 Remove support for "old-style" connect syntax
 (where the driver name is the 4th parameter).
 
-Remove undocumented DBI->err and DBI->errstr methods.
-Or maybe add DBI->state for consistency? Or maybe keep but warn?
+Change undocumented DBI->err and DBI->errstr methods to warn.
 
 Remove old informix fudge in tables() (would only impact people
 using very old DBD::Informix versions as it now has it's own).
@@ -140,8 +139,17 @@
 change *.xst to treat either that or -2 as an error. (The -2 is
 a transition for old drivers.)
 
+Consider making $DBI::err etc plain (untied) variables and setting them
+in set_err() and clearing them, if appropriate, in dispatch().
+Requires drivers to use set_err but they'll have to to get full
+error/warn/info semantics anyway.
+
 --- Other changes
 
+Ensure child $h has err reset after connect_cached() or prepare_cached()
+or else document that $DBI:err may be true after those methods even
+though they haven't failed. Umm.
+
 Change t/zz_*_pp.t to be t/zXX_*.t where XX is a combination of:
  - 'pp' (for DBI_PUREPERL=2)
  - 'mx' (for DBI_AUTOPROXY=dbi:Multiplex:)
@@ -161,6 +169,8 @@
 
 Trace to tied file handle.
 
+Add method to try to make the connection (session) read-only.
+
 preparse() - incl ability to split statements on semicolon
 
 Hooks for method entry and exit.
@@ -400,6 +410,8 @@
 is too small and overhead will be 0 normally but may be eg 100ms
 if overhead probe is on cusp of time unit.
 
+Fix dbi_time for Windows by using or linking-to Time::HiRes code.
+
 Add a C call to return boolean for is a number' for a given SV.
 Needs to do the right thing for a non-numeric string SV that's been
 tested in a numeric context (eg $a='S23'; foo() if $a==-1; $sth->execute($a))

Modified: dbi/trunk/lib/DBI/ProfileDumper.pm
==============================================================================
--- dbi/trunk/lib/DBI/ProfileDumper.pm  (original)
+++ dbi/trunk/lib/DBI/ProfileDumper.pm  Mon Apr 19 08:46:33 2004
@@ -30,12 +30,12 @@
   # another way to say it
   use DBI::Profile qw(DBIprofile_Statement);
   $dbh->{Profile} = DBI::ProfileDumper->new(
-                      { Path => [ DBIprofile_Statement ]
-                        File => 'dbi.prof' });
+                        Path => [ DBIprofile_Statement ]
+                        File => 'dbi.prof' );
 
   # using a custom path
-  $dbh->{Profile} = DBI::ProfileDumper->new({ Path => [ "foo", "bar" ],
-                                              File => 'dbi.prof' });
+  $dbh->{Profile} = DBI::ProfileDumper->new( Path => [ "foo", "bar" ],
+                                             File => 'dbi.prof' );
 
 
 =head1 DESCRIPTION
@@ -61,8 +61,8 @@
 
   use DBI::Profile qw(DBIprofile_Statement);
   $dbh->{Profile} = DBI::ProfileDumper->new(
-                      { Path => [ DBIprofile_Statement ]
-                        File => 'dbi.prof' });
+                        Path => [ DBIprofile_Statement ]
+                        File => 'dbi.prof' );
 
 The C<Path> option takes the same values as in
 L<DBI::Profile|DBI:Profile>.  The C<File> option gives the name of the

Modified: dbi/trunk/t/40profile.t
==============================================================================
--- dbi/trunk/t/40profile.t     (original)
+++ dbi/trunk/t/40profile.t     Mon Apr 19 08:46:33 2004
@@ -25,7 +25,7 @@
 }
 
 use Test;
-BEGIN { plan tests => 57; }
+BEGIN { plan tests => 59; }
 
 use Data::Dumper;
 $Data::Dumper::Indent = 1;
@@ -137,15 +137,18 @@
 $sth = $dbh->prepare($sql);
 $sth->execute();
 while ( my $hash = $sth->fetchrow_hashref ) {}
+$dbh->do($sql); # check dbh do() gets associated with right statement
 
 # check that the resulting tree fits the expected layout
 $data = $dbh->{Profile}{Data};
 ok($data);
 ok(exists $data->{$sql});
-ok(keys %{$data->{$sql}} == 3);
+ok(keys %{$data->{$sql}}, 5);
 ok(exists $data->{$sql}{prepare});
 ok(exists $data->{$sql}{execute});
 ok(exists $data->{$sql}{fetchrow_hashref});
+ok(exists $data->{$sql}{do});
+ok(exists $data->{$sql}{DESTROY});
 
 
 

Reply via email to