From: Tony Cook Date: Mon, 19 Feb 2018 23:10:34 +0000 (+1100) Subject: suppress error messages from the shell when probing Storable limits X-Git-Tag: v5.27.10~142 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/3d79e577a768f4ffbe0d25be5bcf58ae9d112001?hp=f73ae54b0323e4c8ed1192ec7b9807eebfc8c1c9 suppress error messages from the shell when probing Storable limits --- diff --git a/dist/Storable/stacksize b/dist/Storable/stacksize index a698726..5ea40da 100644 --- a/dist/Storable/stacksize +++ b/dist/Storable/stacksize @@ -4,6 +4,7 @@ use Config; use Cwd; +use File::Spec; use strict; my $fn = "lib/Storable/Limit.pm"; @@ -123,6 +124,10 @@ sub bad { return $j; } +unless ($ENV{STORABLE_NOISY}) { + # suppress Segmentation fault messages + open STDERR, ">", File::Spec->devnull; +} while (!$found) { my $cmd = cmd($n, '$t=[$t]', 'recursion_limit'); #print "$cmd\n" unless $QUIET;