The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::RDAP::Link - a module representing an RDAP link.

DESCRIPTION

Links are used throughout RDAP; the following objects may contain zero or more links:

In all cases, the modules representing these types of object inherit from Net::RDAP::Base and therefore provide a links() method which will return a (potentially empty) array of Net::RDAP::Link objects.

METHODS

Value

    $value = $link->value;

Returns a string containing the value of the value property of the link object, if any.

Context URI

    $uri = $link->context;

Returns a URI object representing the context URI of the link, as described in Section 3.2 of RFC 8288.

This URI object is constructed from the value of the value property (described above). If the value of this property is a relative URL, then an absolute URL will be computed using the URI of the RDAP response that contains the link object.

Relationship

    $rel = $link->rel;

Returns the "relationship" attribute. The possible values are defined by an IANA registry; see:

URL

    $url = $link->href;

Returns a URI object corresponding to the target of the link.

Language

    @languages = $link->hreflang;

Returns a (potentially empty) array containing the ISO-639-2 codes which describe the language that the target is available in.

Title

    $title = $link->title;

Returns the "title" attribute of the link. This labels the destination of a link such that it can be used as a human-readable identifier in the language of the context in which the link appears.

Media

    $media = $link->media;

Returns the "media" attribute of the link. This corresponds to the media/device the target resource is optimized for.

Media Type

    $type = $link->type;

Returns a MIME::Type object corresponding to the media type of the target resource.

    $is = $link->is_rdap;

Returns true if the media type of the target resource suggests that it is in an RDAP resource.

COPYRIGHT

Copyright 2018-2023 CentralNic Ltd, 2024 Gavin Brown. All rights reserved.

LICENSE

Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.