The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

NAME

Protocol::Yadis::Document::Service - Protocol::Yadis::Document service object

SYNOPSIS

my $s = Protocol::Yadis::Document::Service->new;
$s->attr(priority => 4);
$s->elements(
[ Protocol::Yadis::Document::Service::Element->new(
name => 'URI',
content => 'foo'
attrs => [priority => 0]
),
Protocol::Yadis::Document::Service::Element->new(
name => 'URI',
content => 'foo'
attrs => [priority => 4]
),
Protocol::Yadis::Document::Service::Element->new(
name => 'Type',
content => 'bar'
),
Protocol::Yadis::Document::Service::Element->new(
name => 'URI',
content => 'baz'
)
]
);
# <Service>
# <Type>foo</Type>
# <URI priority="0">foo</URI>
# <URI priority="4">foo</URI>
# <URI>bar</URI>
# <URI>baz</URI>
# </Service>

DESCRIPTION

This is a service object for Protocol::Yadis::Document.

ATTRIBUTES

http_req_cb

METHODS

new

Creates a new Protocol::Yadis::Document::Services instance.

element

Gets element by name.

Type

Shortcut for getting Type element.

URI

Shortcut for getting URI element.

elements

Gets/sets elements.

attrs

Gets/sets service attributes.

attr

Gets/sets service attribute.

to_string

String representation.

AUTHOR

Viacheslav Tykhanovskyi, vti@cpan.org.

COPYRIGHT

Copyright (C) 2009, Viacheslav Tykhanovskyi.

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