Author: timbo
Date: Wed May 23 05:21:17 2007
New Revision: 9596

Modified:
   dbi/trunk/lib/DBI/ProfileDumper.pm

Log:
DBI::ProfileDumper: empty() now sets Data to undef not {}.
Avoid undef during global destruction.


Modified: dbi/trunk/lib/DBI/ProfileDumper.pm
==============================================================================
--- dbi/trunk/lib/DBI/ProfileDumper.pm  (original)
+++ dbi/trunk/lib/DBI/ProfileDumper.pm  Wed May 23 05:21:17 2007
@@ -241,7 +241,7 @@
 
 # empty out profile data
 sub empty {
-    shift->{Data} = {};
+    shift->{Data} = undef;
 }
 
 
@@ -252,8 +252,11 @@
     # isolate us against globals which effect print
     local($\, $,);
 
+    # $self->VERSION can return undef during global destruction
+    my $version = $self->VERSION || $VERSION;
+
     # module name and version number
-    print $fh ref($self), " ", $self->VERSION, "\n";
+    print $fh ref($self)." $version\n";
 
     # print out Path (may contain CODE refs etc)
     my @path_words = map { escape_key($_) } @{ $self->{Path} || [] };

Reply via email to