| Protocol-XMLRPC documentation | Contained in the Protocol-XMLRPC distribution. |
Protocol::XMLRPC::Value::String - XML-RPC array
my $string = Protocol::XMLRPC::Value::String->new('Hello, world!');
XML-RPC string
newCreates new Protocol::XMLRPC::Value::String instance.
typeReturns 'string'.
value my $string = Protocol::XMLRPC::Value::String->new('foo');
# $string->value returns 'foo'
Returns serialized Perl5 scalar.
to_string my $string = Protocol::XMLRPC::Value::String->new('foo');
# $string->to_string is now '<string>foo</string>'
XML-RPC string string representation.
Viacheslav Tykhanovskyi, vti@cpan.org.
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.
| Protocol-XMLRPC documentation | Contained in the Protocol-XMLRPC distribution. |
package Protocol::XMLRPC::Value::String; use strict; use warnings; use base 'Protocol::XMLRPC::Value'; sub type {'string'} sub to_string { my $self = shift; my $value = $self->value; $value =~ s/&/&/g; $value =~ s/</</g; $value =~ s/>/>/g; return "<string>$value</string>"; } 1; __END__