HEllo list four quick questions ::
 
# 1) is there a CGI way to grab the scheme fo a url ??
    with uri you can do $scheme = $uril->schem($url); but I may need a way to do it 
with CGI without doing a regex or split at the ':'
 
$self_url = self_url();
 
# 2) which way is faster the CGI way or the URI way/what's the best way to test for 
this ??
 
print "CGI VERSION :: <br>\n";
 
print url(-relative=>1);
print "\n<br>\n";
print query_string();
print "\n<br>\n";
print url();
 
print "\n<P>\n";
 
print "URI VERSION :: <br>\n";
 
$uril = URI->new($self_url);
print $uril->rel($self_url);
print "\n<br>\n";
print $uril->query;
print "\n<br>\n";
print $uril->canonical;

# if URI is faster then
# how can I get rel() and canonical() without the query() part 
(?query=this&that=theother ) 
# in one line without having to assign it to a variable then strip the ?tothe=end off
 
# is there a URI way ( I can't seem to find one ) or is there a way way to incorporate 
the regexp into the line
# print $uril->canonical() =~ s/\?.*$//; 

Reply via email to