# untested sample code my $a = Foo->retrieve(999); # $a is CDBI object &some_sub('' . $a); # cast object back to scalar, here 999 #### # untested sample code my $mocka = Test::MockObject->new; $mocka->set_isa('Foo'); # ??? how to overload stringification # such that I can mock the result of # '' . $mocka # ???