X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsimple.t;h=80772caddfc0569455f2ccd83c63baeef7e83eee;hb=c630715aa8fed80229afaf677e1cfc1206685f89;hp=7dfc49cd391835de13e352b3a9bba297ae7f0cd6;hpb=974f544246b897eb9932cc0c2c2ca67b3eaf8fd3;p=p5sagit%2FDevel-Declare.git diff --git a/t/simple.t b/t/simple.t index 7dfc49c..80772ca 100644 --- a/t/simple.t +++ b/t/simple.t @@ -10,9 +10,21 @@ sub method { use Devel::Declare 'method'; +my ($args1, $args2); + method bar { - my $str = join(', ', @_); - is($str, 'main, baz, quux', 'Method args ok'); + $args1 = join(', ', @_); +}; + +method # blather + baz + # whee +{ + $args2 = join(', ', @_); }; -__PACKAGE__->bar(qw(baz quux)); +__PACKAGE__->bar(qw(1 2)); +__PACKAGE__->baz(qw(3 4)); + +is($args1, 'main, 1, 2', 'Method bar args ok'); +is($args2, 'main, 3, 4', 'Method baz args ok');