SOAP::WSDL::XSD::Typelib::Builtin - Built-in XML Schema datatypes
This module implements all builtin Types from the XML schema specification.
Objects of a class may be filled with values and serialize correctly.
These basic type classes are most useful when used as element or simpleType base classes.
The datatypes classes themselves are split up into SOAP::WSDL::XSD::Typelib::Builtin::* modules.
Using SOAP::WSDL::XSD::Typelib::Builtin uses all of the builtin datatype classes.
my $bool = SOAP::WSDL::XSD::Typelib::Builtin::bool->new({ value => 0} ); print $bool; # prints "true" # implements <simpleType name="MySimpleType"> # <list itemType="xsd:string" /> # </simpleType> package MySimpleType; use SOAP::WSDL::XSD::Typelib::Builtin; use SOAP::WSDL::XSD::Typelib::SimpleType; use base qw(SOAP::WSDL::XSD::Typelib::SimpleType SOAP::WSDL::XSD::Typelib::Builtin::list SOAP::WSDL::XSD::Typelib::Builtin::string ); 1; # somewhere else my $list = MySimpleType->new({ value => [ 'You', 'shall', 'overcome' ] }); print $list; # prints "You shall overcome"
This is the inheritance graph for builtin types.
Types with [] marker describe types derived via the item in [] in the XML Schema specs.
Derivation is implemented via multiple inheritance with the derivation method as first item in the base class list.
anyType - anySimpleType - duration - dateTime - date - time - gYearMonth - gYear - gMonthDay - gDay - gMonth - boolean - base64Binary - hexBinary - float - decimal - integer - nonPositiveInteger - negativeInteger - nonNegativeInteger - positiveInteger - unsignedLong - unsignedInt - unsignedShort - unsignedByte - long - int - short - byte - double - anyURI - string - normalizedString - language - Name - NCName - ID - IDREF - IDREFS [list] - ENTITY - NMTOKEN - NMTOKENS [list]
Overloading is implemented via Class::Std's trait mechanism.
The following behaviours apply:
string context
All classes use the serialize method for stringification.
serialize
bool context
All classes derived from anySimpleType return their value in bool context
numeric context
The boolean class returns 0 or 1 in numeric context.
decimal, float and double (and derived classes) return their value in numeric context.
Thread safety
SOAP::WSDL::XSD::Typelib::Builtin uses Class::Std::Storable which uses Class::Std. Class::Std is not thread safe, so SOAP::WSDL::XSD::Typelib::Builtin is neither.
XML Schema facets
No facets are implemented yet.
Replace whitespace by @ in e-mail address.
Martin Kutter E<gt>martin.kutter fen-net.deE<lt>
Copyright 2004-2007 Martin Kutter.
This library is free software, you may distribute/modify it under the same terms as perl itself
To install SOAP::WSDL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SOAP::WSDL
CPAN shell
perl -MCPAN -e shell install SOAP::WSDL
For more information on module installation, please visit the detailed CPAN module installation guide.