% perl -MData::Dumper -MMath::GMP -wle ' $Data::Dumper::Freezer = "zify"; local *UNIVERSAL::zify = sub { warn "zify $_[0]"; $_[0]->isa("Math::GMP") ? "z$_[0]" : $_[0] }; my $x = [ Math::GMP->new(1) ]; print "x[0]=$x->[0]"; print Dumper($x); print "x[0]=$x->[0]"; ' Name "UNIVERSAL::zify" used only once: possible typo at -e line 3. x[0]=1 zify 1 at -e line 3. $VAR1 = [ bless( do{\(my $o = 40040032)}, 'Math::GMP' ) ]; x[0]=1 #### % perl -MData::Dumper -MMath::GMP -wle ' $Data::Dumper::Freezer = "zify"; local *UNIVERSAL::zify = sub { warn "zify $_[0]"; $_[0]->isa("Math::GMP") ? "z$_[0]" : $_[0] }; my $x = [ Math::GMP->new(1) ]; print "x[0]=$x->[0]"; print Dumper($x); print "x[0]=$x->[0]"; ' Name "UNIVERSAL::zify" used only once: possible typo at -e line 1. x[0]=1 zify 1 at -e line 1. $VAR1 = [ \undef ]; x[0]=z1