X-Git-Url: http://erislabs.net/gitweb/?p=liburi-template-perl.git;a=blobdiff_plain;f=README;h=6dc86bdf59957482f54b2b054110923f7f83a0b6;hp=5c56f21d53ad2159dea01d78278fba9824b3d5d0;hb=bf23e788f027c454711a8421b44945acbb2443b8;hpb=c4fd5064ccd0e0c568bec68ebe82f3daf6c235b6 diff --git a/README b/README index 5c56f21..6dc86bd 100644 --- a/README +++ b/README @@ -1,16 +1,23 @@ NAME - URI::Template - Object for handling URI templates + URI::Template - Object for handling URI templates (RFC 6570) SYNOPSIS use URI::Template; + 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 is an initial attempt to provide a wrapper around URI templates as - described at - http://www.ietf.org/internet-drafts/draft-gregorio-uritemplate-03.txt + This module provides a wrapper around URI templates as described in RFC + 6570: . INSTALLATION perl Makefile.PL @@ -21,14 +28,15 @@ INSTALLATION 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 - 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. @@ -44,13 +52,13 @@ METHODS Processes input like the "process" method, but doesn't inflate the result to a URI object. -AUTHOR - Brian Cassidy +AUTHORS + * Brian Cassidy - Ricardo SIGNES + * Ricardo SIGNES COPYRIGHT AND LICENSE - Copyright 2008 by Brian Cassidy + Copyright 2007-2015 by Brian Cassidy This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.