method.t: Test more method-BLOCK edge cases
authorFather Chrysostomos <sprout@cpan.org>
Fri, 14 Sep 2012 17:19:58 +0000 (10:19 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 15 Sep 2012 05:29:46 +0000 (22:29 -0700)
t/op/method.t

index 09f6ee3..ff39231 100644 (file)
@@ -13,7 +13,7 @@ BEGIN {
 use strict;
 no warnings 'once';
 
-plan(tests => 98);
+plan(tests => 101);
 
 @A::ISA = 'B';
 @B::ISA = 'C';
@@ -417,3 +417,15 @@ eval { () = undef; new {} };
 like $@,
      qr/^Can't call method "new" without a package or object reference/,
     'Err msg from new{} when stack contains undef';
+
+package egakacp {
+  our @ISA = 'ASI';
+  sub ASI::m { shift; "@_" };
+  my @a = (bless([]), 'arg');
+  my $r = SUPER::m{@a};
+  ::is $r, 'arg', 'method{@array}';
+  $r = SUPER::m{}@a;
+  ::is $r, 'arg', 'method{}@array';
+  $r = SUPER::m{@a}"b";
+  ::is $r, 'arg b', 'method{@array}$more_args';
+}