Toby Inkster > JSON-Hyper-0.011 > JSON::Hyper::Link

Download:
JSON-Hyper-0.011.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.011   Source  

NAME ^

JSON::Hyper::Link - represents a link found in a JSON document

DESCRIPTION ^

This is a tiny object representng a hyperlink found in a JSON document. You totally have my permission to treat it as a hashref if you want. Encapsulation, ensmapulation!

Constructor

Generally speaking you don't want to construct these. They're constructed by JSON::Hyper's find_links method and I can't think of any conceivable reason why you'd want to construct one yourself. Nevertheless...

new(\%attrs)
new($uri)

Constructor takes a hashref of attributes, or a single URI as a string.

Attributes

These attributes are hash keys for the constructor, and also exist as methods that can be called on the object to retrieve the value.

href

The URL linked to.

rel

The relationship between the URL has with the document that linked to it.

targetSchema

A JSON schema (see JSON::Schema) that the URL linked to supposedly conforms to.

A method target_schema is also available if you're alergic to camelCase, but targetSchema is the only attribute recognised by the constructor.

method

The HTTP method recommended for interacting with the URL. If undef, then 'GET' is usually a good bet.

enctype

If POSTing data to this URL, the recommended Content-Type header.

schema
properties

BUGS ^

Please report any bugs to http://rt.cpan.org/.

SEE ALSO ^

Related modules: JSON::Hyper.

AUTHOR ^

Toby Inkster <tobyink@cpan.org>.

COPYRIGHT AND LICENCE ^

Copyright 2010-2012 Toby Inkster.

This module is tri-licensed. It is available under the X11 (a.k.a. MIT) licence; you can also redistribute it and/or modify it under the same terms as Perl itself.

a.k.a. "The MIT Licence"

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.

syntax highlighting: