dougm 02/05/29 21:05:07
Modified: lib/Apache compat.pm
t/response/TestApache compat2.pm
Log:
add compat for Apache::Table->new
Revision Changes Path
1.57 +8 -0 modperl-2.0/lib/Apache/compat.pm
Index: compat.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- compat.pm 30 May 2002 03:54:08 -0000 1.56
+++ compat.pm 30 May 2002 04:05:06 -0000 1.57
@@ -472,5 +472,13 @@
APR::URI->parse($r->pool, $uri);
}
+package Apache::Table;
+
+sub new {
+ my($class, $r, $nelts) = @_;
+ $nelts ||= 10;
+ APR::Table::make($r->pool, $nelts);
+}
+
1;
__END__
1.14 +6 -1 modperl-2.0/t/response/TestApache/compat2.pm
Index: compat2.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestApache/compat2.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- compat2.pm 25 May 2002 17:49:03 -0000 1.13
+++ compat2.pm 30 May 2002 04:05:06 -0000 1.14
@@ -24,7 +24,7 @@
sub handler {
my $r = shift;
- plan $r, tests => 44;
+ plan $r, tests => 45;
$r->send_http_header('text/plain');
@@ -225,6 +225,11 @@
my $ptime = Apache::Util::parsedate($fmtdate);
ok t_cmp($time, $ptime, "Apache::Util::parsedate");
+
+ my $t = Apache::Table->new($r);
+ my $t_class = ref $t;
+
+ ok t_cmp('APR::Table', $t_class, "Apache::Table->new");
#note these are not actually part of the tests
#since i think on platforms where crypt is not supported,