=item rpath
Returns the I<path> minus I<path_info>.
my $path = $uri->rpath;
and xs:
SV *
rpath(uri)
Apache::URI uri CODE:
RETVAL = Nullsv; if(uri->path_info) {
int uri_len = strlen(uri->uri.path);
int n = strlen(uri->path_info);
int set = uri_len - n;
if(set > 0)
RETVAL = newSVpv(uri->uri.path, set);
}
else {
if (uri->uri.path) {
RETVAL = newSVpv(uri->uri.path, 0);
}
} OUTPUT:
RETVALIt should be trivial to add it, but I'm not sure where it belongs. Since path_info (which it needs to get rpath) is a request_rec member, rpath can't belong to APR::URI, as the latter is non-specific to Apache. So the only thing I can think of is to make it $r->rpath, but we won't be able to provide a back-compat function which was called on Apache::URI object, since there is no $r object (well, unless +GlobalRequest is on).
-- __________________________________________________________________ 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]
