OK, I've slept well on this issue and the first thing I thought of in the morning is a brilliant solution ;) obviously, what else could you expect after such a good sleep ;)
my $module = "Foo::bar"; { my $path = Apache::TestRequest::module2path($module); GET $path; # GET "/Foo__bar" } { my $url = Apache::TestRequest::module2url($module, "http"); GET $url; # GET "http://localhost:8545/Foo__bar" }
notice how much simpler it's than it used to be. Internally module2url does:
sub module2url { my $module = shift; my $scheme = shift || "http";
Apache::TestRequest::module($module); my $config = Apache::Test::config(); my $hostport = Apache::TestRequest::hostport($config); my $path = Apache::TestRequest::module2path($module); return "$scheme://$hostport$path"; }
of course we fix module2path to prepend /.
So what do you think?
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
