- SEE ALSO
- COPYRIGHT AND LICENCE
- DISCLAIMER OF WARRANTIES
URI::duri - the duri URI scheme
my $uri = URI->new('duri:2012:http://tobyinkster.co.uk/'); say $uri->embedded_uri;
The dated URI scheme is defined in an Internet Draft http://tools.ietf.org/html/draft-masinter-dated-uri-10. Dated URIs include a date and an embedded URI. They identify the same resource that was identified by the embedded URI at the given date.
This module brings support for the duri URI scheme to the URI framework.
The constructor can be called in two forms:
When called with a string argument, must be a URI string conforming to the dated URI Internet Draft.
If called with a hashref argument, the hash must have a key
embedded_uri which is a string or URI object. It may have a key
datetime_string which is a string representing a datetime in the format required by the dated URI specification; alternatively it may have a key
datetime which is a DateTime or (better) DateTime::Incomplete object; if neither are present, then the current time is used instead.
The following accessors are provided:
Get/set the URI's datetime as a DateTime::Incomplete object.
Get/set the URI's datetime as a literal string.
Get/set the embedded URI as a URI object. (The setter may also be called with a plain string.)
The following methods are inherited from URI and make sense to use:
Get/set the URI scheme.
Get the URI as a string.
Get the URI as a Unicode string.
Get the URI as a canonical string.
Returns false, though the method doesn't make much sense. One URI is no more secure than another; it is protocols that can be secure or insecure.
Tests if this URI is equal to another.
The following methods are also inherited from URI, but don't make much sense to use:
fragment. It generally makes more sense to inspect the embedded URI:
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=URI-duri.
Toby Inkster <tdb:2012:http://metacpan.org/author/TOBYINK>.
This software is copyright (c) 2012 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.