This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid ass_u_ming uppercase types are not user objects (spotted
authorGurusamy Sarathy <gsar@cpan.org>
Wed, 8 Sep 1999 20:52:51 +0000 (20:52 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 8 Sep 1999 20:52:51 +0000 (20:52 +0000)
by Kurt Starsinic)

p4raw-id: //depot/perl@4108

ext/Data/Dumper/Dumper.pm

index 4705669..c37e6b5 100644 (file)
@@ -13,7 +13,7 @@ $VERSION = $VERSION = '2.101';
 
 #$| = 1;
 
-require 5.004;
+require 5.004_02;
 require Exporter;
 require DynaLoader;
 require overload;
@@ -214,9 +214,8 @@ sub _dump {
   if ($type) {
 
     # prep it, if it looks like an object
-    if ($type =~ /[a-z_:]/) {
-      my $freezer = $s->{freezer};
-      $val->$freezer() if $freezer && UNIVERSAL::can($val, $freezer);
+    if (my $freezer = $s->{freezer}) {
+      $val->$freezer() if UNIVERSAL::can($val, $freezer);
     }
 
     ($realpack, $realtype, $id) =