GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Routes::Tiny::Pattern(3) User Contributed Perl Documentation Routes::Tiny::Pattern(3)

Routes::Tiny::Pattern - Routes pattern

    my $pattern = Routes::Tiny::Pattern->new(
        pattern  => '/:foo/:bar',
        defaults => {bar => 'index'},
        name     => 'route'
    );

    my $match = $pattern->match('/hello/world');

    my $path = $pattern->build_path('route', foo => 'hello', bar => 'world');

Routes::Tiny::Pattern is an Object that incapsulates pattern matching and path building.

Pass default values for captures.

Pass constraints.

Pass route name.

Pass arbitrary arguments.

    my $pattern = Routes::Tiny::Pattern->new;

Create new instance of Routes::Tiny::Pattern.

Match pattern agains a path.

    $pattern->build_path('name', {foo => 'bar'});

Build path from a given name and params.

2017-07-12 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.