Author: timbo
Date: Sun Jun 12 13:29:32 2005
New Revision: 1079

Modified:
   dbi/trunk/Changes
   dbi/trunk/lib/DBI/ProfileDumper.pm
Log:
Fixed bug in DBI::ProfileDumper thanks to Sam Tregar.


Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes   (original)
+++ dbi/trunk/Changes   Sun Jun 12 13:29:32 2005
@@ -9,6 +9,7 @@ DBI::Changes - List of significant chang
   Fixed croak() in DBD::NullP thanks to Sergey Skvortsov.
   Fixed handling of take_imp_data() and dbi_imp_data attribute.
   Fixed bugs in DBD::DBM thanks to Jeff Zucker.
+  Fixed bug in DBI::ProfileDumper thanks to Sam Tregar.
 
   Changed internals to be more strictly coded thanks to Andy Lester.
   Changed warning about multiple copies of Driver.xst found in @INC

Modified: dbi/trunk/lib/DBI/ProfileDumper.pm
==============================================================================
--- dbi/trunk/lib/DBI/ProfileDumper.pm  (original)
+++ dbi/trunk/lib/DBI/ProfileDumper.pm  Sun Jun 12 13:29:32 2005
@@ -210,15 +210,17 @@ sub write_header {
 
     # print out Path
     my @path_words;
-    foreach (@{$self->{Path}}) {
-        if ($_ eq DBI::Profile::DBIprofile_Statement) {
-            push @path_words, "DBIprofile_Statement";
-        } elsif ($_ eq DBI::Profile::DBIprofile_MethodName) {
-            push @path_words, "DBIprofile_MethodName";
-        } elsif ($_ eq DBI::Profile::DBIprofile_MethodClass) {
-            push @path_words, "DBIprofile_MethodClass";
-        } else {
-            push @path_words, $_;
+    if ($self->{Path}) {
+        foreach (@{$self->{Path}}) {
+            if ($_ eq DBI::Profile::DBIprofile_Statement) {
+                push @path_words, "DBIprofile_Statement";
+            } elsif ($_ eq DBI::Profile::DBIprofile_MethodName) {
+                push @path_words, "DBIprofile_MethodName";
+            } elsif ($_ eq DBI::Profile::DBIprofile_MethodClass) {
+                push @path_words, "DBIprofile_MethodClass";
+            } else {
+                push @path_words, $_;
+            }
         }
     }
     print $fh "Path = [ ", join(', ', @path_words), " ]\n";

Reply via email to