dougm 01/12/10 20:08:55
Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm
TestRequest.pm
Log:
fix fallback functions (GET_BODY GET_STR HEAD_STR) for when lwp is not
installed
Revision Changes Path
1.93 +7 -1
httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
Index: TestConfig.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- TestConfig.pm 2001/12/10 05:31:39 1.92
+++ TestConfig.pm 2001/12/11 04:08:55 1.93
@@ -1042,7 +1042,13 @@
#shortcuts
-my %include_headers = (GET => 1, HEAD => 2);
+my %include_headers = (
+ GET => 1,
+ GET_STR => 1,
+ GET_BODY => 0,
+ HEAD => 2,
+ HEAD_STR => 2,
+);
sub http_raw_get {
my($self, $url, $h) = @_;
1.61 +3 -1
httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm
Index: TestRequest.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRequest.pm,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- TestRequest.pm 2001/12/11 03:48:13 1.60
+++ TestRequest.pm 2001/12/11 04:08:55 1.61
@@ -385,6 +385,8 @@
my $method = "HTTP::Request::Common::$name";
no strict 'refs';
+ next unless defined &$method; #else fallback a few below
+
*$name = sub {
my($url, $pass, $keep) = prepare(@_);
return lwp_call($method, undef, $url, @$pass);
@@ -406,7 +408,7 @@
#this is intended to be a fallback if LWP is not installed
#so at least some tests can be run, it is not meant to be robust
-for my $name (qw(GET HEAD)) {
+for my $name (qw(GET_BODY GET_STR HEAD_STR)) {
next if defined &$name;
no strict 'refs';
*$name = sub {