in reply to Overriding as_string ?

and if you're inspecting the variable in the debugger (perl -d), use "x $foo", not "p $foo", it will print as nicely as Data::Dumper.