XML::Easy::Classify(3pm) | User Contributed Perl Documentation | XML::Easy::Classify(3pm) |
XML::Easy::Classify - classification of XML-related items
use XML::Easy::Classify qw( is_xml_name check_xml_name is_xml_encname check_xml_encname is_xml_chardata check_xml_chardata is_xml_attributes check_xml_attributes is_xml_content_object check_xml_content_object is_xml_content_twine check_xml_content_twine is_xml_content check_xml_content is_xml_element check_xml_element); if(is_xml_name($arg)) { ... check_xml_name($arg); if(is_xml_encname($arg)) { ... check_xml_encname($arg); if(is_xml_chardata($arg)) { ... check_xml_chardata($arg); if(is_xml_attributes($arg)) { ... check_xml_attributes($arg); if(is_xml_content_object($arg)) { ... check_xml_content_object($arg); if(is_xml_content_twine($arg)) { ... check_xml_content_twine($arg); if(is_xml_content($arg)) { ... check_xml_content($arg); if(is_xml_element($arg)) { ... check_xml_element($arg);
This module provides various type-testing functions, relating to data types used in the XML::Easy ensemble. These are mainly intended to be used to enforce validity of data being processed by XML-related functions.
There are two flavours of function in this module. Functions of the first flavour only provide type classification, to allow code to discriminate between argument types. Functions of the second flavour package up the most common type of type discrimination: checking that an argument is of an expected type. The functions come in matched pairs.
Each of these functions takes one scalar argument (ARG) to be tested. Any scalar value is acceptable for the argument to be tested. Each "is_" function returns a simple truth value result, which is true iff ARG is of the type being checked for. Each "check_" function will return normally if the argument is of the type being checked for, or will "die" if it is not.
Params::Classify, XML::Easy::NodeBasics
Andrew Main (Zefram) <zefram@fysh.org>
Copyright (C) 2009, 2010, 2011, 2017 Andrew Main (Zefram) <zefram@fysh.org>
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2020-11-09 | perl v5.32.0 |