Author: stevehay Date: Thu Oct 3 12:13:18 2019 New Revision: 1867934 URL: http://svn.apache.org/viewvc?rev=1867934&view=rev Log: Fix t/modules/apache_resource.t failures
The values returned by BSD::Resource::$res() are sometimes undefined, but the values of the hashref returned by get_rlimits() are fine. Modified: perl/modperl/trunk/lib/Apache2/Resource.pm Modified: perl/modperl/trunk/lib/Apache2/Resource.pm URL: http://svn.apache.org/viewvc/perl/modperl/trunk/lib/Apache2/Resource.pm?rev=1867934&r1=1867933&r2=1867934&view=diff ============================================================================== --- perl/modperl/trunk/lib/Apache2/Resource.pm (original) +++ perl/modperl/trunk/lib/Apache2/Resource.pm Thu Oct 3 12:13:18 2019 @@ -115,8 +115,7 @@ sub status_rlimit { "</tr>"); for my $res (keys %$lim) { - my $val = eval "&BSD::Resource::${res}()"; - my ($soft, $hard) = getrlimit $val; + my ($soft, $hard) = getrlimit($lim->{$res}); (my $limit = $res) =~ s/^RLIMIT_//; ($soft, $hard) = ("$soft " . BM($soft), "$hard ". BM($hard)) if $is_mb{$limit};