You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by pg...@apache.org on 2006/08/23 08:53:39 UTC

svn commit: r433945 - /perl/Apache-SizeLimit/trunk/lib/Apache/BaseSizeLimit.pm

Author: pgollucci
Date: Tue Aug 22 23:53:38 2006
New Revision: 433945

URL: http://svn.apache.org/viewvc?rev=433945&view=rev
Log:
USE_SMAPS was being unconditionally overwritten by code outside
its initialization because the init code was in a BEGIN {} block.

Reported by: Simon Luff <si...@coreware.co.uk>

Modified:
    perl/Apache-SizeLimit/trunk/lib/Apache/BaseSizeLimit.pm

Modified: perl/Apache-SizeLimit/trunk/lib/Apache/BaseSizeLimit.pm
URL: http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/lib/Apache/BaseSizeLimit.pm?rev=433945&r1=433944&r2=433945&view=diff
==============================================================================
--- perl/Apache-SizeLimit/trunk/lib/Apache/BaseSizeLimit.pm (original)
+++ perl/Apache-SizeLimit/trunk/lib/Apache/BaseSizeLimit.pm Tue Aug 22 23:53:38 2006
@@ -28,7 +28,6 @@
 $VERSION = '0.91-dev';
 
 $REQUEST_COUNT          = 1;
-$USE_SMAPS              = 1;
 
 use constant IS_WIN32 => $Config{'osname'} eq 'MSWin32' ? 1 : 0;
 
@@ -123,6 +122,7 @@
         *_platform_getppid = \&_linux_getppid;
 
         if (eval { require Linux::Smaps } && Linux::Smaps->new($$)) {
+            $USE_SMAPS = 1;
             *_platform_check_size = \&_linux_smaps_size_check;
         }
         else {