stas 2004/04/05 15:44:30
Modified: build xsbuilder.pl
glue/perl/xsbuilder/Apache/Cookie Cookie_pm
glue/perl/xsbuilder/Apache/Request Request_pm
Log:
- deal with undef's being used to compare or being dereferenced
- tighten up the warnings allowance, make them fatal early on so we deal
with them
Revision Changes Path
1.22 +18 -11 httpd-apreq-2/build/xsbuilder.pl
Index: xsbuilder.pl
===================================================================
RCS file: /home/cvs/httpd-apreq-2/build/xsbuilder.pl,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -u -r1.21 -r1.22
--- xsbuilder.pl 24 Mar 2004 08:22:47 -0000 1.21
+++ xsbuilder.pl 5 Apr 2004 22:44:30 -0000 1.22
@@ -233,36 +233,42 @@
sub pm_text {
my($self, $module, $isa, $code) = @_;
- return <<EOF;
+ my $text = <<"EOF";
$self->{noedit_warning_hash}
package $module;
require DynaLoader ;
-use strict ;
+
+use strict;
+use warnings FATAL => 'all';
+
use vars qw{\$VERSION [EMAIL PROTECTED] ;
$isa
push [EMAIL PROTECTED], 'DynaLoader' ;
\$VERSION = '$version';
bootstrap $module \$VERSION ;
+EOF
-# XXX How do we test for the appropriate modperl version?
-# The modperl package isn't necessarily loaded, but Apache2
-# is. Perhaps Apache2 should always include a VERSION?
+ $text .= <<'EOF';
-if (\$ENV{MOD_PERL}) {
+if ($ENV{MOD_PERL}) {
require mod_perl;
- if (\$mod_perl::VERSION > 1.99) {
+ my $env = __PACKAGE__->env || '';
+ if ($mod_perl::VERSION > 1.99) {
die __PACKAGE__ . ": httpd must load mod_apreq.so first"
- if __PACKAGE__->env ne "Apache::RequestRec";
+ if $env ne "Apache::RequestRec";
}
- elsif (\$mod_perl::VERSION > 1.24) {
+ elsif ($mod_perl::VERSION > 1.24) {
die __PACKAGE__ . ": httpd must load mod_apreq1.so first"
- if __PACKAGE__->env ne "Apache";
+ if $env ne "Apache";
}
else {
- die "Unrecognized mod_perl version number: \$modperl::VERSION";
+ die "Unrecognized mod_perl version number: $modperl::VERSION";
}
}
+EOF
+
+ $text .= <<"EOF";
$code
@@ -270,6 +276,7 @@
__END__
EOF
+ return $text;
}
sub makefilepl_text {
my($self, $class, $deps,$typemap) = @_;
1.13 +1 -3 httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Cookie_pm
Index: Cookie_pm
===================================================================
RCS file:
/home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Cookie/Cookie_pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -u -r1.12 -r1.13
--- Cookie_pm 9 Feb 2004 21:58:37 -0000 1.12
+++ Cookie_pm 5 Apr 2004 22:44:30 -0000 1.13
@@ -1,5 +1,3 @@
-use strict;
-use warnings FATAL => 'all';
use APR;
use APR::Table;
@@ -33,7 +31,7 @@
sub fetch {
my $self = shift;
my $jar = $self->jar(@_);
- return wantarray ? %{scalar $jar->cookie} : $jar->cookie;
+ return wantarray ? %{(scalar $jar->cookie) || {}} : $jar->cookie;
}
sub freeze {
1.9 +0 -2
httpd-apreq-2/glue/perl/xsbuilder/Apache/Request/Request_pm
Index: Request_pm
===================================================================
RCS file:
/home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Request/Request_pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -u -r1.8 -r1.9
--- Request_pm 9 Feb 2004 21:58:37 -0000 1.8
+++ Request_pm 5 Apr 2004 22:44:30 -0000 1.9
@@ -1,5 +1,3 @@
-use strict;
-use warnings FATAL => 'all';
use APR;
use APR::Table;