Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
URI::Template::RestricUser Contributed Perl DocumentURI::Template::Restrict(3)

NAME
       URI::Template::Restrict - restricted URI	Templates handler

SYNOPSIS
	   use URI::Template::Restrict;

	   my $template	= URI::Template::Restrict->new(
	       'http://example.com/{foo}'
	   );

	   my $uri = $template->process(foo => 'y');
	   # $uri: "http://example.com/y"

	   my %result =	$template->extract($uri);
	   # %result: (foo => 'y')

DESCRIPTION
       This is a restricted URI	Templates handler. URI Templates is described
       at <http://bitworking.org/projects/URI-Templates/>.

       This module supports draft-gregorio-uritemplate-03 except -opt and -neg
       operators.

METHODS
   new($template)
       Creates a new instance with the template.

   process(%vars)
       Given a hash of key-value pairs.	It will	URI escape the values,
       substitute them in to the template, and return a	URI object.

   process_to_string(%vars)
       Processes input like the	process	method,	but doesn't inflate the	result
       to a URI	object.

   extract($uri)
       Extracts	variables from an uri based on the current template.  Returns
       a hash with the extracted values.

PROPERTIES
   template
       Returns the original template string.

   variables
       Returns a list of unique	variable names found in	the template.

   expansions
       Returns a list of URI::Template::Restrict::Expansion objects found in
       the template.

AUTHOR
       NAKAGAWA	Masaki <masaki@cpan.org>

LICENSE
       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

SEE ALSO
       URI::Template, <http://bitworking.org/projects/URI-Templates/>

perl v5.24.1			  2010-08-28	    URI::Template::Restrict(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | PROPERTIES | AUTHOR | LICENSE | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=URI::Template::Restrict&sektion=3&manpath=FreeBSD+12.1-RELEASE+and+Ports>

home | help