package Foo; use Data::Dumper; Data::Dumper->Freezer( "__FREEZE" ); # Incorrect! sub __FREEZE { # custom class dump here }