Here's the patch for Apache::TestRequest::module2url().
A set of patches to use it within the modperl tests is on it's way to the dev list.



-=Chris
Index: lib/Apache/TestRequest.pm
===================================================================
--- lib/Apache/TestRequest.pm   (revision 110069)
+++ lib/Apache/TestRequest.pm   (working copy)
@@ -107,6 +107,23 @@
     return $path;
 }
 
+sub module2url {
+    my $module   = shift;
+    my $opt      = shift || {};
+    my $scheme   = $opt->{scheme} || 'http';
+    my $path     = $opt->{path} ||
+        Apache::TestRequest::module2path($module);
+
+    $path =~ s/^\///;
+
+    Apache::TestRequest::module($module);
+
+    my $config   = Apache::Test::config();
+    my $hostport = Apache::TestRequest::hostport($config);
+
+    return "$scheme://$hostport/$path";
+}
+
 sub user_agent {
     my $args = [EMAIL PROTECTED];
 

Reply via email to