From: Peter Rabbitson Date: Mon, 10 Aug 2009 21:48:04 +0000 (+0000) Subject: Use accessors instead of reaching down object guts X-Git-Tag: v0.11008~133 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e593decbf96279f091850dd4ee35ee06dd6187e7;p=dbsrgits%2FSQL-Translator.git Use accessors instead of reaching down object guts --- diff --git a/t/04file,fh,string.t b/t/04file,fh,string.t index 7e4d7b0..9121412 100644 --- a/t/04file,fh,string.t +++ b/t/04file,fh,string.t @@ -37,8 +37,7 @@ my ($v1, $v2); } # XXX- Hack to remove Graph hack! -delete $v1->{translator}; -delete $v2->{translator}; +$_->translator (undef) for ($v1, $v2); ok(length $v1, "passing string (filename) works"); ok(length $v2, "passing string as SCALAR reference"); diff --git a/t/07p_args.t b/t/07p_args.t index 988987b..51ffbec 100644 --- a/t/07p_args.t +++ b/t/07p_args.t @@ -46,7 +46,7 @@ is(scalar @fields, 4, "right number of fields"); # # Blow away the existing schema object. # -$tr->{'schema'} = undef; +$tr->schema (undef); # Now, pass parser_args indirectly... $tr->parser(\&silly_parser, { delimiter => "\t" });