Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Rose::URI 0.021

    Download button

    No screenshots available
    Downloads: 321  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    John C. Siracusa | More programs
    Perl Artistic License / FREE
    March 26th, 2007, 18:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Rose::URI description

    Rose::URI is a standalone URI class allowing easy and efficient manipulation of query parameters and other URI components.

    Rose::URI is a standalone URI class allowing easy and efficient manipulation of query parameters and other URI components.

    SYNOPSIS

    use Rose::URI;

    $uri = Rose::URI->new('http://un:pw@foo.com/bar/baz?a=1&b=two+3');

    $scheme = $uri->scheme;
    $user = $uri->username;
    $pass = $uri->password;
    $host = $uri->host;
    $path = $uri->path;
    ...

    $b = $uri->query_param('b'); # $b = "two 3"
    $a = $uri->query_param('a'); # $a = 1

    $uri->query_param_delete('b');
    $uri->query_param('c' => 'blah blah');
    ...

    print $uri;

    Rose::URI is an alternative to URI. The important differences are as follows.

    Rose::URI provides a rich set of query string manipulation methods. Query parameters can be added, removed, and checked for their existence. URI allows the entire query to be set or returned as a whole via the query_form or query methods, and the URI::QueryParam module provides a few more methods for query string manipulation.

    Rose::URI supports query parameters with multiple values (e.g. "a=1&a=2"). URI has limited support for this (through query_form's list return value. Better methods are available in URI::QueryParam.

    Rose::URI uses Apache's C-based URI parsing and HTML escaping functions when running in a mod_perl 1.x web server environment.

    Rose::URI stores each URI "in pieces" (scheme, host, path, etc.) and then assembles those pieces when the entire URI is needed as a string. This technique is based on the assumption that the URI will be manipulated many more times than it is stringified. If this is not the case in your usage scenario, then URI may be a better alternative.

    Now some similarities: both classes use the overload module to allow "magic" stringification. Both URI and Rose::URI objects can be printed and compared as if they were strings.
    Rose::URI actually uses the URI class to do the heavy lifting of parsing URIs when not running in a mod_perl 1.x environment.

    Finally, a caveat: Rose::URI supports only "http"-like URIs. This includes ftp, http, https, and other similar looking URIs. URI supports many more esoteric URI types (gopher, mailto, etc.) If you need to support these formats, use URI instead.

    Requirements:

    · Perl



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    URI class | query parameters | Perl module | Rose::URI | URI | class

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM