use Tie::DATA(':foo', sub{ return($_[0], IO::String->new($_[1])); });