Skip to content

Perl6 realization of URI — Uniform Resource Identifiers handler

License

Notifications You must be signed in to change notification settings

ufobat/uri

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perl6 realization of URI - Uniform Resource Identifiers handler

Interprets URIs using Perl 6 grammars that implement RFC 3986 BNF. Currently only implements parsing. Includes URI::Escape to (un?)escape characters that aren't otherwise allowed in a URI with % and a hex character numbering.

use URI;
my URI $u .= new('http://her.com/foo/bar?tag=woow#bla');
my $scheme = $u.scheme;
my $authority = $u.authority;
my $host = $u.host;
my $port = $u.port;
my $path = $u.path;
my $query = $u.query;
my $frag = $u.frag; # or $u.fragment;
my $tag = $u.query-form<tag>; # should be woow
# etc.

use URI::Escape;
my $escaped = uri-escape("10% is enough\n");
my $un-escaped = uri-unescape('10%25%20is%20enough%0A'); 

License

Artistic License 2.0

Status

Build Status

About

Perl6 realization of URI — Uniform Resource Identifiers handler

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Other 100.0%