Author: pgollucci
Date: Thu Aug 24 03:03:59 2006
New Revision: 434366

URL: http://svn.apache.org/viewvc?rev=434366&view=rev
Log:
o add deprecated apis
o include the global vars in our namespace
o update the pod


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

Modified: perl/Apache-SizeLimit/trunk/lib/Apache2/SizeLimit.pm
URL: 
http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/lib/Apache2/SizeLimit.pm?rev=434366&r1=434365&r2=434366&view=diff
==============================================================================
--- perl/Apache-SizeLimit/trunk/lib/Apache2/SizeLimit.pm (original)
+++ perl/Apache-SizeLimit/trunk/lib/Apache2/SizeLimit.pm Thu Aug 24 03:03:59 
2006
@@ -32,7 +32,13 @@
 # 2.x requires 5.6.x+ so 'our' is okay
 our $VERSION = '0.91-dev';
 
-use Apache::BaseSizeLimit;
+use Apache::BaseSizeLimit qw(
+                             $MAX_PROCESS_SIZE
+                             $MAX_UNSHARED_SIZE
+                             $MIN_SHARE_SIZE
+                             $CHECK_EVERY_N_REQUESTS
+                             $START_TIME
+                            );
 our @ISA = qw(Apache::BaseSizeLimit);
 
 __PACKAGE__->set_check_interval(1);
@@ -108,6 +114,37 @@
     return Apache2::Const::OK;
 }
 
+{
+    # Deprecated APIs
+
+    sub setmax {
+
+        my $class = __PACKAGE__;
+
+        $class->set_max_process_size(shift);
+
+        $class->add_cleanup_handler();
+    }
+
+    sub setmin {
+
+        my $class = __PACKAGE__;
+
+        $class->set_min_shared_size(shift);
+
+        $class->add_cleanup_handler();
+    }
+
+    sub setmax_unshared {
+
+        my $class = __PACKAGE__;
+
+        $class->set_max_unshared_size(shift);
+
+        $class->add_cleanup_handler();
+    }
+}
+
 1;
 
 __END__
@@ -304,7 +341,7 @@
     require Apache2::SizeLimit;
     package X;
     use strict;
-    use Apache::Constants qw(OK);
+    use Apache2::Const -compile => qw(OK);
 
     my $x = "a" x (1024*1024);
 


Reply via email to