X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=README;h=b07c19f8f74521c0fac69f3f546414bb3b5a5732;hb=90a266f52eaecdd5e15d16fe4fa3b98cb184c67c;hp=75f354a5b62ddb7f5072dd73caa1ba1bac8bfe4e;hpb=3f3d56e5fb9a55ee113ccf2bc03f3a453f80baa0;p=liburi-template-perl.git diff --git a/README b/README index 75f354a..b07c19f 100644 --- a/README +++ b/README @@ -13,7 +13,7 @@ SYNOPSIS 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-00.txt + http://www.ietf.org/internet-drafts/draft-gregorio-uritemplate-01.txt INSTALLATION To install this module via Module::Build: @@ -40,15 +40,21 @@ METHODS stringified. variables( ) - Returns an array of variable names found in the template. + Returns an array of variable names found in the template. NB: they are + returned in random order. - process( %vars ) - Given a list of key-value pairs, it will URI escape the values and - substitute them in to the template. Returns a URI object. + all_variables( ) + Returns an array of variable names found as they appear in template -- + in order, duplicates included. - process_to_string( %vars ) - Processes key-values pairs like the "process" method, but doesn't - inflate the result to a URI object. + process( %vars|\@values ) + Given a list of key-value pairs or an array ref of values (for + positional substitution), it will URI escape the values and substitute + them in to the template. Returns a URI object. + + process_to_string( %vars|\@values ) + Processes input like the "process" method, but doesn't inflate the + result to a URI object. deparse( $uri ) Does some rudimentary deparsing of a uri based on the current template.