From: Vincent Pit Date: Sun, 27 Feb 2011 15:59:13 +0000 (+0100) Subject: Get rid of indirect object constructs X-Git-Tag: rt63842~2 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=4029ebd6f816e06cf833e77fb6800370913461aa;p=perl%2Fmodules%2FB-RecDeparse.git Get rid of indirect object constructs --- diff --git a/t/10-obj.t b/t/10-obj.t index 49f3dc7..ffa66fd 100644 --- a/t/10-obj.t +++ b/t/10-obj.t @@ -7,7 +7,7 @@ use Test::More tests => 10; use B::RecDeparse; -my $brd = new B::RecDeparse; +my $brd = B::RecDeparse->new; ok(defined $brd, 'BRD object is defined'); is(ref $brd, 'B::RecDeparse', 'BRD object is valid'); ok($brd->isa('B::Deparse'), 'BRD is a BD'); @@ -22,5 +22,5 @@ ok(defined $brd3, 'BRD::new called as a function works '); is(ref $brd3, 'B::RecDeparse', 'BRD::new called as a functions returns a B::RecDeparse object'); ok($brd3->isa('B::Deparse'), 'BRD is a BD'); -eval { $brd2 = new B::RecDeparse qw }; +eval { $brd2 = B::RecDeparse->new(qw) }; like($@, qr/Optional\s+arguments/, 'BRD::new gets parameters as key => value pairs');