Package DE_EPAGES::EPagesJ::API::Object::UriTemplate
Template for creating URIs based on patterns in the URI path.
Example |
my $Template = DE_EPAGES::EPagesJ::API::Object::UriTemplate->new( 'http://myhost/rs/', 'path/{someVar}/{someThingElse}', {'someVar' => 'value'}); foreach my $secondVar (qw(bla blubb)) { # absolute uri to # http://myhost/rs/path/value/bla and # http://myhost/rs/path/value/bllubb my $uri = $Template->uri({'someThingElse' => $secondVar}); } |
Functions
new
Creates a UriTemplate.
Syntax |
my $Template = UriTemplate->new( $baseUrl, $pathTemplate, $hParams ); |
Input |
|
uri
Creates an URL::URI replacing key/value pairs from the input parameters.
Syntax |
$uri = $Template->uri( $hParams ); |
Input |
|
Output |
|