Imported Upstream version 0.18
[liburi-template-perl.git] / README
1 NAME
2     URI::Template - Object for handling URI templates (RFC 6570)
3
4 SYNOPSIS
5         use URI::Template;
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'
9
10 DESCRIPTION
11     This module provides a wrapper around URI templates as described in RFC
12     6570: <http://tools.ietf.org/html/rfc6570>.
13
14 INSTALLATION
15         perl Makefile.PL
16         make
17         make test
18         make install
19
20 METHODS
21   new( $template )
22     Creates a new URI::Template instance with the template passed in as the
23     first parameter.
24
25   template
26     This method returns the original template string.
27
28   variables
29     Returns an array of unique variable names found in the template. NB:
30     they are returned in random order.
31
32   expansions
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
35     interesting.
36
37   process( \%vars )
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.
41
42   process_to_string( \%vars )
43     Processes input like the "process" method, but doesn't inflate the
44     result to a URI object.
45
46 AUTHORS
47     *   Brian Cassidy <bricas@cpan.org>
48
49     *   Ricardo SIGNES <rjbs@cpan.org>
50
51 COPYRIGHT AND LICENSE
52     Copyright 2007-2013 by Brian Cassidy
53
54     This library is free software; you can redistribute it and/or modify it
55     under the same terms as Perl itself.
56