2 URI::Template - Object for handling URI templates (RFC 6570)
6 my $template = URI::Template->new( 'http://example.com/{x}' );
7 my $uri = $template->process( x => 'y' );
8 # uri is a URI object with value 'http://example.com/y'
11 This module provides a wrapper around URI templates as described in RFC
12 6570: http://tools.ietf.org/html/rfc6570
22 Creates a new URI::Template instance with the template passed in as the
26 This method returns the original template string.
29 Returns an array of unique variable names found in the template. NB:
30 they are returned in random order.
33 This method returns an list of expansions found in the template.
34 Currently, these are just coderefs. In the future, they will be more
38 Given a list of key-value pairs or an array ref of values (for
39 positional substitution), it will URI escape the values and substitute
40 them in to the template. Returns a URI object.
42 process_to_string( \%vars )
43 Processes input like the "process" method, but doesn't inflate the
44 result to a URI object.
47 * Brian Cassidy <bricas@cpan.org>
49 * Ricardo SIGNES <rjbs@cpan.org>
52 Copyright 2007-2012 by Brian Cassidy
54 This library is free software; you can redistribute it and/or modify it
55 under the same terms as Perl itself.