From bfde49d45e9457b1d8a9e18b55d5b0c7615ddcd6 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Fri, 14 Sep 2012 10:19:58 -0700 Subject: [PATCH] method.t: Test more method-BLOCK edge cases --- t/op/method.t | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/t/op/method.t b/t/op/method.t index 09f6ee3..ff39231 100644 --- a/t/op/method.t +++ b/t/op/method.t @@ -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'; +} -- 2.7.4