The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::Loy::HostMeta - HostMeta Extension for XRD

SYNOPSIS

  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>

DESCRIPTION

XML::Loy::HostMeta is an extension to XML::Loy::XRD and provides addititional functionality for the work with HostMeta documents.

METHODS

XML::Loy::HostMeta inherits all methods from XML::Loy and implements the following new ones.

host

  $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.

DEPENDENCIES

Mojolicious.

AVAILABILITY

  https://github.com/Akron/XML-Loy

COPYRIGHT AND LICENSE

Copyright (C) 2011-2016, Nils Diewald.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl.