From: Vincent Pit Date: Sat, 30 Aug 2008 18:53:30 +0000 (+0200) Subject: Test method call inside method call X-Git-Tag: v0.04~2 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=commitdiff_plain;h=a6ff113a643fb1f626edbdc5c1d7ed0d2ce73c95 Test method call inside method call --- diff --git a/t/10-good.t b/t/10-good.t index 14f96d2..6510bea 100644 --- a/t/10-good.t +++ b/t/10-good.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 32 * 2; +use Test::More tests => 33 * 2; my ($obj, $pkg, $cb, $x); sub meh; @@ -120,3 +120,5 @@ meh $x, 1 , 2; print STDOUT "bananananananana\n"; #### print $x "oh hai\n"; +#### +$x->foo($pkg->$cb) diff --git a/t/20-bad.t b/t/20-bad.t index 05efb50..ce17983 100644 --- a/t/20-bad.t +++ b/t/20-bad.t @@ -3,9 +3,9 @@ use strict; use warnings; -use Test::More tests => 28 * 2; +use Test::More tests => 30 * 2; -my ($obj, $pkg, $cb, $x); +my ($obj, $x); { local $/ = "####\n"; @@ -95,3 +95,7 @@ $obj = HlaghHlagh Hlagh; # HlaghHlagh Hlagh $obj = new newnew; #### $obj = new newnew; # new newnew +#### +new Hlagh (meh $x) +#### +Hlagh->new(meh $x)