Implementation of https://tools.ietf.org/html/rfc6570 for Perl 6
Perl6
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
lib/URI
t
.gitignore
.travis.yml
LICENCE
META6.json
README.md

README.md

URI::Template Build Status

Implementation of https://tools.ietf.org/html/rfc6570 for Perl 6

Synopsis


use URI::Template;

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

say $template.process(foo => 'baz', bar => 'quux'); # http://foo.com/baz/quux

Description

This provides an implementation of RFC 6570 which allows for the definition of a URI through variable expansion.

Installation

Assuming you have a working perl6 installation you should be able to install this with panda :

# From the source directory

panda install .

# Remote installation

panda install URI::Template

I haven't tested this with "zef" but I see no reason why it shouldn't work.

Support

Suggestions/patches are welcomed via github at

https://github.com/jonathanstowe/URI-Template

The test data covers all of the examples given in the RFC and a few others, if you think the behaviour is incorrect please state the section of the RFC and provide a failing example with the required variables, template and the expected output.

Licence

Please see the LICENCE file in the distribution

© Jonathan Stowe 2015, 2016

The testing uses the test data from https://github.com/uri-templates/uritemplate-test please see the README.md in the t/data/uritemplate-test for the license for that project.