NAKAGAWA Masaki > URI-Platonic-0.02 > URI::Platonic

Download:
URI-Platonic-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.02   Source   Latest Release: URI-Platonic-0.03

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);
  
  print $platonic->path;      # "/path/to/resource"
  print $platonic->extension; # "html"
  print $platonic->platonic;  # "http://example.com/path/to/resource"
  print $platonic->distinct;  # "http://example.com/path/to/resource.html"
  
  $platonic->extension('xml');
  print $platonic->distinct;  # "http://example.com/path/to/resource.xml"
  
  $platonic->path('/path/to/another');
  print $platonic->platonic;  # "http://example.com/path/to/another"
  print $platonic->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