URI::Attr

URI::Attr is a Perl module to associate attributes with the URI name space.
Download

URI::Attr Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Gisle Aas
  • Publisher web site:
  • http://search.cpan.org/~gaas/

URI::Attr Tags


URI::Attr Description

URI::Attr is a Perl module to associate attributes with the URI name space. URI::Attr is a Perl module to associate attributes with the URI name space.SYNOPSIS use URI::Attr; $attr = URI::Attr->new; $attr->attr_update(SERVER => "http://www.perl.com")->{visit} = "yes"; if ($attr->attr_plain($url, "visit")) { #... }Instances of the URI::Attr class is able to associate attributes with "places" in the URI name space. The main idea is to be able to look up all attributes that are relevant to a specific absolute URI efficiently and to be able to override attributes at different hierarchal levels of the URI namespace.The levels of the URI namespace is given the following names: GLOBAL - affect all URIs SCHEME - affect all URIs of the given scheme DOMAIN - affect all URIs within the given domain (domains nest) HOST - a given host SERVER - a specific server (port) on the host DIR - a directory component (nestable) PATH - the final path componentGLOBAL and SCHEME are the only levels available for all URIs. The other levels only make sense for URIs that follow the generic URL pattern (like http: and ftp: schemes). Other level names can be used for specific schemes.Lets take a look at an example. Consider the following URL: http://www.perl.com/cgi-bin/cpan_mod?module=LWPThis URL can be broken up into the following hierarchal levels: SCHEME http DOMAIN .com DOMAIN .perl HOST www SERVER 80 (implicit port) DIR cgi-bin PATH cpan-mod Requirements: · Perl


URI::Attr Related Software