use strict; use Test::More tests => 1; # setup, to be provided by you my $response = $useragent->get($url); my $stored_as_file = $response->as_string; my $restored_response = HTTP::Response->parse( $stored_as_file ); is $stored_as_file, $restored_response->as_string, "->as_string() is idempotent"; #### binmode $fh; #### open my $fh, ">", $temp_response_name or die "Couldn't create '$temp_response_name': $!";