1#!/usr/bin/perl 2 3use strict; 4use warnings; 5use utf8; 6use open qw( :utf8 :std ); 7 8require q(./test.pl); plan(tests => 1); 9 10=pod 11 12This tests the use of an eval{} block to wrap a next::method call. 13 14=cut 15 16{ 17 package అ; 18 use mro 'c3'; 19 20 sub ຟǫ { 21 die 'అ::ຟǫ died'; 22 return 'అ::ຟǫ succeeded'; 23 } 24} 25 26{ 27 package b; 28 use base 'అ'; 29 use mro 'c3'; 30 31 sub ຟǫ { 32 eval { 33 return 'b::ຟǫ => ' . (shift)->next::method(); 34 }; 35 36 if ($@) { 37 return $@; 38 } 39 } 40} 41 42like(b->ຟǫ, 43 qr/^అ::ຟǫ died/u, 44 'method resolved inside eval{}'); 45 46 47