NAKAGAWA Masaki > URI-Platonic-0.03 > URI::Platonic

Download:
URI-Platonic-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.03   Source  

NAME ^

URI::Platonic - Platonic and Distinct URIs

SYNOPSIS ^

  use URI::Platonic;
  
  my $uri = URI::Platonic->new(uri => "http://example.com/path/to/resource.html");
     $uri = URI::Platonic->new(uri => URI->new("http://example.com/foo.xml"));
  
  print $uri->path;      # "/path/to/resource"
  print $uri->extension; # "html"
  print $uri->platonic;  # "http://example.com/path/to/resource"
  print $uri->distinct;  # "http://example.com/path/to/resource.html"
  
  $uri->extension('xml');
  print $uri->distinct;  # "http://example.com/path/to/resource.xml"
  
  $uri->path('/path/to/another');
  print $uri->platonic;  # "http://example.com/path/to/another"
  print $uri->distinct;  # "http://example.com/path/to/another.xml"

DESCRIPTION ^

URI::Platonic is a URI-like module for "Platonic" and "Distinct" URIs, described in RESTful Web Services.

METHODS ^

new(uri => $uri)

Constructs a new URI::Platonic object.

extension([ $extension ])

Gets/Sets a extension part of the distinct URI.

platonic()

Returns a platonic URI.

distinct()

Returns a distinct URI.

clone()

Returns a copy of the URI::Platonic object.

canonical()

Returns a normalized version of the URI::Platonic object.

as_string()

Returns a plain string of the platonic URI.

PRIVATES ^

BUILD

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