2
package Net::OpenID::Yadis::Service;
4
$Net::OpenID::Yadis::Service::VERSION = '1.14';
10
sub URI { Net::OpenID::Yadis::_pack_array(shift->{'URI'}) }
11
sub Type { Net::OpenID::Yadis::_pack_array(shift->{'Type'}) }
12
sub priority { shift->{'priority'} }
16
my ($field,$xmlns) = @_;
17
$xmlns and $field = "\{$xmlns\}$field";
26
Net::OpenID::Yadis::Service - Class representing an XRDS Service element
34
use Net::OpenID::Yadis;
35
my $disc = Net::OpenID::Yadis->new();
36
my @xrd = $disc->discover("http://id.example.com/") or Carp::croak($disc->err);
38
foreach my $srv (@xrd) { # Loop for Each Service in Yadis Resourse Descriptor
39
print $srv->priority; # Service priority (sorted)
40
print $srv->Type; # Identifier of some version of some service (scalar, array or array ref)
41
print $srv->URI; # URI that resolves to a resource providing the service (scalar, array or array ref)
42
print $srv->extra_field("Delegate","http://openid.net/xmlns/1.0");
43
# Extra field of some service
48
After L<Net::OpenID::Yadis> performs discovery, the result is a list
49
of instances of this class.
55
=item $srv->B<priority>
57
The priority value for the service.
61
The URI representing the kind of service provided at the endpoint for this record.
65
The URI of the service endpoint.
67
=item $srv->B<extra_field>( $fieldname , $namespace )
69
Fetch the value of extension fields not provided directly by this class.
71
If C<$namespace> is not specified, the default is the namespace whose name is the empty string.
75
=head1 COPYRIGHT, WARRANTY, AUTHOR
77
See L<Net::OpenID::Yadis> for author, copyright and licensing information.
83
Yadis website: L<http://yadis.org/>
b'\\ No newline at end of file'