my $mocked_data = Test::Mock::HTTP::Tiny->mocked_data(); store $mocked_data, 'mock_html.dat'; ... my $replay = retrieve 'mock_html.dat'; print "ref: ".ref($replay)."\n"; Test::Mock::HTTP::Tiny->set_mocked_data($replay);