Shlomi Fish > Test-XML-Ordered > Test::XML::Ordered

Download:
Test-XML-Ordered-0.0.8.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.0.8   Source  

NAME ^

Test::XML::Ordered - compare two XML files for equivalency, in an ordered fashion.

SYNOPSIS ^

    use Test::More tests => 1;

    use Test::XML::Ordered;

    # TEST:$c++;
    is_xml_ordered(
        [ string => $got_xml_source, ], # Got.
        [ string => $expected_xml_source, ], # Expected.
        {}, # Options
        "Equivalent", # Blurb
    );

DESCRIPTION ^

This module is a test module which compares two XML files for equivalence in an ordered fashion. It was written after I (= Shlomi Fish) realised that XML::SemanticDiff, which is the basis for Test::XML, and which I maintain, compares two XML files for equivalence in a "semantic" fashion where elements can be present in several possible orders. (It does not always do the right thing with this respect, but even if it did, it is not normally what I want.).

Other advantages of Test::XML::Ordered are:

EXPORTS ^

is_xml_ordered($got_params, $expected_params, $args, $message)

Compares two XMLs for equivalance. $got_params and $expected_params are array references passed to XML::LibXML::Reader . $args is an hash reference of options (currently not used but will be used in the future). $message is the blurb.

METHODS ^

new

For internal use for now.

compare

For internal use for now.

AUTHOR ^

Shlomi Fish, http://www.shlomifish.org/ .

BUGS ^

Please report any bugs or feature requests to the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-XML-Ordered. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Test::XML::Ordered

You can also look for information at:

ACKNOWLEDGEMENTS ^

COPYRIGHT & LICENSE ^

Copyright 2012 Shlomi Fish.

This program is distributed under the MIT (X11) License: http://www.opensource.org/licenses/mit-license.php

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

syntax highlighting: