Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    URI::Dispatch 1.4.1

    Download button

    No screenshots available
    Downloads: 100  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Mark Norman Francis | More programs
    Perl Artistic License / FREE
    July 20th, 2011, 05:40 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    URI::Dispatch description

    Determine which code to execute based upon path

    URI::Dispatch is a Perl module to determine which code to execute based upon path.

    SYNOPSIS

     my $dispatch = URI::Dispatch->new();
     $dispatch->add( '/', 'Homepage' );
     
     # common matching patterns are available
     $dispatch->add( '/user/#id', 'Profile' );
     
     # optional parts of the path
     $dispatch->add( '/article/#id[/#slug]', 'Article' );
     
     # named captures
     $dispatch->add( '/tag/#name:slug', 'Tag' );
     
     # use a custom regexp
     $dispatch->add( '/a-z/#letter:([a-z])', 'AZ::Page' );
     
     # pass in a path and determine what matches
     my( $handler, $options)
     = $dispatch->handler( '/article/5/awesome-article' );
     # handler='Article', options=['5','awesome-article']
     
     # automatically calls Tag::get (as that matches the path)
     my $response = $dispatch->dispatch( '/tag/perl' );
     
     # construct paths
     my $uri = $dispatch->url( 'article', [ '1', 'some-article' ] );
     # uri='/article/1/some-article'



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    execute code | Perl module | URI dispatch | Perl | code | executor

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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