XML::Loy::HostMeta - HostMeta Extension for XRD
use XML::Loy::XRD; my $xrd = XML::Loy::XRD->new; $xrd->extension(-HostMeta); $xrd->subject('http://sojolicio.us/'); $xrd->host('sojolicio.us'); print $xrd->to_pretty_xml; # <?xml version="1.0" encoding="UTF-8" standalone="yes"?> # <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0" # xmlns:hm="http://host-meta.net/xrd/1.0" # xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> # <Subject>http://sojolicio.us/</Subject> # <hm:Host>sojolicio.us</hm:Host> # </XRD>
XML::Loy::HostMeta is an extension to XML::Loy::XRD and provides addititional functionality for the work with HostMeta documents.
This module is an early release! There may be significant changes in the future.
XML::Loy::HostMeta inherits all methods from XML::Loy and implements the following new ones.
$xrd->host('sojolicio.us'); print $xrd->host;
Sets or returns host information of the xrd. The support of this element was removed from the specification in draft 09.
09
Mojolicious.
https://github.com/Akron/XML-Loy
Copyright (C) 2011-2013, Nils Diewald.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl.
To install XML::Loy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Loy
CPAN shell
perl -MCPAN -e shell install XML::Loy
For more information on module installation, please visit the detailed CPAN module installation guide.