projects
/
liburi-template-perl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'upstream/0.22'
[liburi-template-perl.git]
/
README
diff --git
a/README
b/README
index
6de3191
..
6dc86bd
100644
(file)
--- a/
README
+++ b/
README
@@
-3,13
+3,21
@@
NAME
SYNOPSIS
use URI::Template;
SYNOPSIS
use URI::Template;
+
my $template = URI::Template->new( 'http://example.com/{x}' );
my $uri = $template->process( x => 'y' );
my $template = URI::Template->new( 'http://example.com/{x}' );
my $uri = $template->process( x => 'y' );
+
+ # or
+
+ my $template = URI::Template->new();
+ $template->template( 'http://example.com/{x}' );
+ my $uri = $template->process( x => 'y' );
+
# uri is a URI object with value 'http://example.com/y'
DESCRIPTION
This module provides a wrapper around URI templates as described in RFC
# uri is a URI object with value 'http://example.com/y'
DESCRIPTION
This module provides a wrapper around URI templates as described in RFC
- 6570:
http://tools.ietf.org/html/rfc6570
+ 6570:
<http://tools.ietf.org/html/rfc6570>.
INSTALLATION
perl Makefile.PL
INSTALLATION
perl Makefile.PL
@@
-20,14
+28,15
@@
INSTALLATION
METHODS
new( $template )
Creates a new URI::Template instance with the template passed in as the
METHODS
new( $template )
Creates a new URI::Template instance with the template passed in as the
- first parameter.
+ first parameter
(optional)
.
- template
- This method returns the original template string.
+ template( $template )
+ This method returns the original template string. If provided, it will
+ also set and parse a new template string.
variables
variables
- Returns an array of unique variable names found in the template
. NB:
-
they are returned in random order
.
+ Returns an array of unique variable names found in the template
(in the
+
order of appearance)
.
expansions
This method returns an list of expansions found in the template.
expansions
This method returns an list of expansions found in the template.
@@
-49,7
+58,7
@@
AUTHORS
* Ricardo SIGNES <rjbs@cpan.org>
COPYRIGHT AND LICENSE
* Ricardo SIGNES <rjbs@cpan.org>
COPYRIGHT AND LICENSE
- Copyright 2007-201
2
by Brian Cassidy
+ Copyright 2007-201
5
by Brian Cassidy
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.