Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37837610
en ru br
Репозитории ALT

Группа :: Разработка/Perl
Пакет: perl-Return-MultiLevel

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: Return-MultiLevel-0.05-Test-Fatal-0.016.patch
Скачать


commit 83d6ea21b310b5e920b03ebf88e295be8fdc5628
Author: Paul Howarth <paul@city-fan.org>
Date:   Mon Aug 17 16:04:20 2020 +0100
    Fix compatibility with Test-Fatal 0.016
    
    Test-Fatal 0.016 sets $Carp::MaxArgNums to -1, which makes function
    arguments invisible in the stack trace and this in turn causes t/debug.t
    to fail. To fix this, explicitly set $Carp::MaxArgNums to 2 in the test
    function to restore visibility of function arguments. This change allows
    the test to work with Test-Fatal 0.016 and also older versions.
diff --git a/t/debug.t b/t/debug.t
index f992358..02699b2 100644
--- a/t/debug.t
+++ b/t/debug.t
@@ -20,6 +20,7 @@ sub bar {
 }
 
 sub baz {
+    local $Carp::MaxArgNums = 2;
     my $f = shift;
     $f->(@_)
 }
@@ -30,10 +31,10 @@ my $exc = exception { baz $ret, 'ducks'; };
 like $exc, qr{
     .* \bwith_return\b .* \Q${\__FILE__}\E .* \b 14 \b .* \n
     .* \bfoo\b         .* \Q${\__FILE__}\E .* \b 19 \b .* \n
-    .* \bbar\b         .* \Q${\__FILE__}\E .* \b 27 \b .* \n
+    .* \bbar\b         .* \Q${\__FILE__}\E .* \b 28 \b .* \n
 }x;
 
 like $exc, qr{
-    .* \bReturn::MultiLevel\b .* \bducks\b .* \Q${\__FILE__}\E .* \b 24 \b .* \n
-    .* \bbaz\b                .* \bducks\b .* \Q${\__FILE__}\E .* \b 28 \b .* \n
+    .* \bReturn::MultiLevel\b .* \bducks\b .* \Q${\__FILE__}\E .* \b 25 \b .* \n
+    .* \bbaz\b                .* \bducks\b .* \Q${\__FILE__}\E .* \b 29 \b .* \n
 }x;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin