Author: phred
Date: Wed Sep 29 03:50:07 2010
New Revision: 1002458
URL: http://svn.apache.org/viewvc?rev=1002458view=rev
Log:
Add warnings.
Fix a large uncaught bug with 0.92.
Modified:
perl/Apache-SizeLimit/trunk/Changes
perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm
perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit/Core.pm
perl/Apache-SizeLimit/trunk/lib/Apache2/SizeLimit.pm
Modified: perl/Apache-SizeLimit/trunk/Changes
URL:
http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/Changes?rev=1002458r1=1002457r2=1002458view=diff
==
--- perl/Apache-SizeLimit/trunk/Changes (original)
+++ perl/Apache-SizeLimit/trunk/Changes Wed Sep 29 03:50:07 2010
@@ -6,9 +6,12 @@ Changes - Apache::SizeLimit change logfi
=over 6
-=item 0.93-dev
-
+=item 0.93-rc1
+Fix overlooked bug where handler expected to be called as a method handler,
+but was documented to be called like a normal Perl cleanup handler ala
+'PerlCleanupHandler Apache2::SizeLimit'
+[Fred Moyer f...@redhotpenguin.com
=item 0.92 2010-09-23
Modified: perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm
URL:
http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm?rev=1002458r1=1002457r2=1002458view=diff
==
--- perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm (original)
+++ perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit.pm Wed Sep 29 03:50:07 2010
@@ -16,6 +16,8 @@
package Apache::SizeLimit;
use strict;
+use warnings;
+
use Config;
use Apache::Constants ();
@@ -24,7 +26,7 @@ use constant IS_WIN32 = $Config{'osname
use vars qw($VERSION);
-$VERSION = '0.93-dev';
+$VERSION = '0.93-rc1';
use Apache::SizeLimit::Core qw(
$MAX_PROCESS_SIZE
@@ -41,18 +43,17 @@ use vars qw(@ISA);
__PACKAGE__-set_check_interval(1);
-sub handler ($$) {
-my $class = shift;
+sub handler {
my $r = shift || Apache-request;
return Apache::Constants::DECLINED() unless $r-is_main();
# we want to operate in a cleanup handler
if ($r-current_callback eq 'PerlCleanupHandler') {
-return $class-_exit_if_too_big($r);
+return __PACKAGE__-_exit_if_too_big($r);
}
else {
-$class-add_cleanup_handler($r);
+__PACKAGE__-add_cleanup_handler($r);
}
return Apache::Constants::DECLINED();
Modified: perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit/Core.pm
URL:
http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit/Core.pm?rev=1002458r1=1002457r2=1002458view=diff
==
--- perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit/Core.pm (original)
+++ perl/Apache-SizeLimit/trunk/lib/Apache/SizeLimit/Core.pm Wed Sep 29
03:50:07 2010
@@ -16,6 +16,7 @@
package Apache::SizeLimit::Core;
use strict;
+use warnings;
use Config;
use Exporter;
@@ -48,7 +49,7 @@ use vars qw(
$START_TIME
);
-$VERSION = '0.93-dev';
+$VERSION = '0.93-rc1';
$REQUEST_COUNT = 1;
Modified: perl/Apache-SizeLimit/trunk/lib/Apache2/SizeLimit.pm
URL:
http://svn.apache.org/viewvc/perl/Apache-SizeLimit/trunk/lib/Apache2/SizeLimit.pm?rev=1002458r1=1002457r2=1002458view=diff
==
--- perl/Apache-SizeLimit/trunk/lib/Apache2/SizeLimit.pm (original)
+++ perl/Apache-SizeLimit/trunk/lib/Apache2/SizeLimit.pm Wed Sep 29 03:50:07
2010
@@ -16,6 +16,8 @@
package Apache2::SizeLimit;
use strict;
+use warnings;
+
use Config;
use APR::Pool ();
@@ -32,7 +34,7 @@ die Apache2::SizeLimit at the moment wo
use constant IS_WIN32 = $Config{'osname'} eq 'MSWin32' ? 1 : 0;
# 2.x requires 5.6.x+ so 'our' is okay
-our $VERSION = '0.93-dev';
+our $VERSION = '0.93-rc1';
use Apache::SizeLimit::Core qw(
$MAX_PROCESS_SIZE
@@ -48,18 +50,17 @@ our @ISA = qw(Apache::SizeLimit::Core);
__PACKAGE__-set_check_interval(1);
-sub handler ($$) {
-my $class = shift;
+sub handler {
my $r = shift || Apache2::RequestUtil-request();
return Apache2::Const::DECLINED unless $r-is_initial_req();
# we want to operate in a cleanup handler
if (ModPerl::Util::current_callback() eq 'PerlCleanupHandler') {
-return $class-_exit_if_too_big($r);
+return __PACKAGE__-_exit_if_too_big($r);
}
else {
-$class-add_cleanup_handler($r);
+__PACKAGE__-add_cleanup_handler($r);
}
return Apache2::Const::DECLINED;