#test.pl use warnings; use strict; use Data::Dumper; use DBM::Deep; use LWP::UserAgent; use Test::More qw(no_plan); my $hash = DBM::Deep->new("foo.db"); my $user_agent = LWP::UserAgent->new; isa_ok($user_agent, 'LWP::UserAgent'); #passes $hash->{my_user_agent} = $user_agent; my $user_agent2 = $hash->{my_user_agent}; isa_ok($user_agent2, 'LWP::UserAgent');#fails print Dumper($user_agent2); #### Failed test (read.pl at line 15) The object isn't a 'LWP::UserAgent' it's a 'DBM::Deep' Looks like you failed 1 tests of 2. ok 1 - The object isa LWP::UserAgent not ok 2 - The object isa LWP::UserAgent $VAR1 = bless( { 'requests_redirectable' => bless( [ 'GET', 'HEAD' ], 'DBM::Deep' ), 'max_redirect' => '7', 'proxy' => undef, 'parse_head' => '1', 'use_eval' => '1', 'timeout' => '180', 'protocols_allowed' => undef, 'agent' => 'libwww-perl/5.79', 'protocols_forbidden' => undef, 'no_proxy' => bless( [], 'DBM::Deep' ), 'from' => undef, 'max_size' => undef }, 'DBM::Deep' ); 1..2