NAME
Protocol::XMLRPC::Value::Array - XML-RPC array
SYNOPSIS
my $array = Protocol::XMLRPC::Value::Array->new(1, 2, 3);
my $array = Protocol::XMLRPC::Value::Array->new([1, 2, 3]);
my $array = Protocol::XMLRPC::Value::Array->new([1]);
my $array = Protocol::XMLRPC::Value::Array->new(
[Protocol::XMLRPC::Value::Double->new(1.2)]);
DESCRIPTION
XML-RPC array
ATTRIBUTES
data
my $data = $array->data;
$data->[0]->value;
Holds elements as objects.
METHODS
new
Creates new Protocol::XMLRPC::Value::Array instance. Elements can be provided as an array or as an array reference.
type
Returns 'array'.
add_data
$array->add_data(1);
$array->add_data([1]);
$array->add_data(Protocol::XMLRPC::Value::String->new('foo'));
Adds value to the array. Can be Perl5 scalar or any Protocol::XMLRCP::Value::* instance, including another array.
value
my $array = Protocol::XMLRPC::Value::Array->new(1, 2, 3);
my $arrayref = $array->value;
# $arrayref is now [1, 2, 3]
Returns serialized Perl5 array reference.
to_string
my $array = Protocol::XMLRPC::Value::Array->new(12);
my $string = $array->to_string;
# <array>
# <data>
# <value><i4>12</i4></value>
# </data>
# </array>'
XML-RPC array string representation.