X-Git-Url: http://erislabs.net/gitweb/?p=liburi-template-perl.git;a=blobdiff_plain;f=README;h=6dc86bdf59957482f54b2b054110923f7f83a0b6;hp=b8e622498b34c87d41469717b5ddbac37ab2cfc0;hb=bf23e788f027c454711a8421b44945acbb2443b8;hpb=5ea1ac36de0445293009b06d3a28620e63f92916 diff --git a/README b/README index b8e6224..6dc86bd 100644 --- a/README +++ b/README @@ -3,8 +3,16 @@ NAME 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 @@ -20,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. @@ -49,7 +58,7 @@ AUTHORS * Ricardo SIGNES COPYRIGHT AND LICENSE - Copyright 2007-2013 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.