SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from OpenSuSE perl-URI-Nested-0.10-lp152.3.2.noarch.rpm

URI::Nested

Section: User Contributed Perl Documentation (3)
Updated: 2015-04-24
Index 

Name

URI::Nested - Nested URIs 

Synopsis

  package URI::jdbc;  use parent 'URI::Nested';  sub prefix       { 'jdbc' }  sub nested_class { undef  }  sub subprotocol  { shift->nested_uri->scheme(@_) }  package main;  my $jdbc_uri = URI->new('jdbc:oracle:scott/tiger@//myhost:1521/myservicename');  my $nested_uri = $jdbc_uri->nested_uri;
 

Description

This class provides support for nested URIs, where the scheme is a prefix, andthe remainder of the URI is another URI. Examples include JDBCURIs <http://docs.oracle.com/cd/B14117_01/java.101/b10979/urls.htm#BEIJFHHB>and database URIs <https://github.com/theory/uri-db>. 

Interface

The following differences exist compared to the "URI" class interface: 

Class Method

"prefix"

Returns the prefix to be used, which corresponds to the URI's scheme. Defaultsto the last part of class name.

"nested_class"

Returns the URI subclass to use for the nested URI. If defined, the nested URIwill always be coerced into this class if it is not naturally an instance ofthis class or one of its subclasses. 

Constructors

"new"

  my $uri = URI::Nested->new($string);  my $uri = URI::Nested->new($string, $base);

Always returns a URI::Nested object. $base may be another URI object orstring. Unlike in URI's "new()", schemes will always be applied to the URIand the nested URI if they does not already schemes. And if "nested_class" isdefined, the nested URI will be coerced into that class. 

Accessors

"scheme"

  my $scheme = $uri->scheme;  $uri->scheme( $new_scheme );

Gets or sets the scheme part of the URI. When setting the scheme, it mustalways be the same as the value returned by "prefix" or an exception will bethrown --- although the letter casing may vary. The returned value is alwayslowercase.

"nested_uri"

  my $nested_uri = $uri->nested_uri;

Returns the nested URI. 

Instance Methods

"abs"

  my $abs = $uri->abs( $base_uri );

Returns the URI::Nested object itself. Unlike URI's "abs()",$URI::ABS_ALLOW_RELATIVE_SCHEME is ignored.

"rel"

  my $rel = $uri->rel( $base_uri );

Returns the URI::Nested object itself. 

Support

This module is stored in an openGitHub repository <http://github.com/theory/uri-db/>. Feel free to fork andcontribute!

Please file bug reports viaGitHub Issues <http://github.com/theory/uri-db/issues/> or by sending mail tobug-URI-db@rt.cpan.org <mailto:bug-URI-dbAATTrt.cpan.org>. 

Author

David E. Wheeler <davidAATTjustatheory.com> 

Copyright and License

Copyright (c) 2013 David E. Wheeler. Some Rights Reserved.

This module is free software; you can redistribute it and/or modify it underthe same terms as Perl itself.


 

Index

Name
Synopsis
Description
Interface
Class Method
Constructors
Accessors
Instance Methods
Support
Author
Copyright and License

This document was created byman2html,using the manual pages.