From 164056e37f5bdd317343988a3f6b7f461c848d1c Mon Sep 17 00:00:00 2001 From: Daniel Frett Date: Fri, 4 Oct 2013 16:43:40 -0400 Subject: [PATCH] fix force_disconnect test on perl < 5.9.0 MogileFS::Client utilizes the fields pragma for defining objects. Before perl 5.9.0 fields utilized psuedo-hashes for the objects, which are not completely compatible with regular blessed hashes. --- t/30-disconnect.t | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/t/30-disconnect.t b/t/30-disconnect.t index 6f2e3f5..d446ef1 100644 --- a/t/30-disconnect.t +++ b/t/30-disconnect.t @@ -4,10 +4,8 @@ use strict; use Test::More; use MogileFS::Client; -my $obj = bless({ - backend => bless({ - }, 'MogileFS::Backend') -}, 'MogileFS::Client'); +my $obj = fields::new('MogileFS::Client'); +$obj->{backend} = fields::new('MogileFS::Backend'); isa_ok($obj, 'MogileFS::Client');