XML-SemanticDiff-1.0005000755000764000764 013046137455 15076 5ustar00shlomifshlomif000000000000README100644000764000764 60013046137455 16013 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005 This archive contains the distribution XML-SemanticDiff, version 1.0005: Perl extension for comparing XML documents. This software is copyright (c) 2001 by Kim Hampton. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. This README file was generated by Dist::Zilla::Plugin::Readme v5.047. Changes100644000764000764 650013046137455 16453 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005Revision history for Perl module XML::SemanticDiff 1.0005 2017-02-06 - Convert the distribution to use git, GitHub, and Dist-Zilla. - Correct some spelling errors and add more tests. - Remove trailing whitespace. 1.0004 2014-02-04 - Update the contact info for Shlomi Fish from the old one. 1.0003 2014-02-01 - Add separate LICENSE file (CPANTS). - Add inc/Test/Run/Builder.pm . 1.0002 2013-08-17 - Convert "Changes" (this file) to CPAN::Changes. - Thanks to https://bitbucket.org/sromanov . 1.0001 2013-08-17 - Fix https://rt.cpan.org/Ticket/Display.html?id=87903 - Case problem with "repository" in "Build.PL". - Remove trailing space. 1.0000 2009-07-28 - Fixed the POD displaying: - https://rt.cpan.org/Ticket/Display.html?id=48259 0.99 2008-10-03 - Now can exclude some paths from the comparison: - http://rt.cpan.org/Ticket/Display.html?id=39705 0.98 2008-09-13 - Added the LICENSE section to the POD (Kwalitee). - Added the "use warnings" (Kwalitee). - Added the "Repository URL" on the resources page. 0.97 2007-08-08 - Added the README (Kwalitee) - Specified the LICENSE (as "perl") explicitly in the Makefile.PL. (Kwalitee) - Added t/pod.t. (Kwalitee). - fixed the POD in the process. - Created a Build.PL script based on the Makefile.PL in order to make sure the META.yml is according to the SPEC. (Kwalitee). - Added the t/pod-coverage.t file and made sure the files have full POD coverage. (Kwalitee) - Made sure the second argument in compare can accept a processed XML result, and refactored the code in the process. Added the t/13to-doc-read.t test file. - Converted the "PathFinder" package in lib/XML/SemanticDiff.pm to "XML::SemanticDiff::PathFinder" to maintain namespace purity. - Converted the Pkg to use an object using Non-Expat-Options. Made the global variables as class members using accessors. 0.96 2007-07-03 - Fixed the warning emitted with the namespaces being undefined. (t/8nonexist_ns.t) - fixes http://rt.cpan.org/Public/Bug/Display.html?id=1379 - Fixed the search algorithm so it will identify the location of the XML tags properly. (t/09two-tags.t) - Applied a modified version of: http://rt.cpan.org/Ticket/Display.html?id=24715 - Fixes an exception when comparing XML with multi-byte characters. - Thanks to RMBARKER - t/10wide-chars.t - Applied a modified version of: http://rt.cpan.org/Ticket/Display.html?id=18491 - Fixes a case where the same tags in different places with identical contents, are not considered semantically identical. - Thanks to CLOTHO for reporting it and suggesting a fix. - t/11tag-in-different-locations.t - Added a regression test against bug: http://rt.cpan.org/Ticket/Display.html?id=2322 - Seems to already have been fixed. - t/12missing-element-has-o-as-cdata.t 0.95 2002-04-09 [ Undocumented changelog. ] 0.93 2001-06-14 - third (hopefully final) BETA - more doc fixes. 0.91 2001-06-12 - second BETA release. - code cleanup. - major doc fixes. 0.50 2001-05-25 - initial public BETA release. 0.01 2001-05-24 - original version; created by h2xs 1.19 LICENSE100644000764000764 5013113046137455 16204 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005Terms of Perl itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" ---------------------------------------------------------------------------- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS ---------------------------------------------------------------------------- The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End dist.ini100644000764000764 76013046137455 16606 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005name = XML-SemanticDiff author = Shlomi Fish license = Perl_5 copyright_holder = Kim Hampton copyright_year = 2001 version = 1.0005 [@Filter] -bundle = @SHLOMIF -remove = License -remove = MakeMaker dist = XML-SemanticDiff github_name = perl-XML-SemanticDiff [MetaResources] repository.url = https://github.com/shlomif/perl-XML-SemanticDiff.git repository.web = https://github.com/shlomif/perl-XML-SemanticDiff repository.type = git [Prereqs / Runtime] -phase = runtime META.yml100644000764000764 2416413046137455 16457 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005--- abstract: 'Perl extension for comparing XML documents.' author: - 'Shlomi Fish ' build_requires: File::Spec: '0' IO::Handle: '0' IPC::Open3: '0' Module::Build: '0.28' Test: '0' Test::More: '0.88' blib: '1.01' configure_requires: Module::Build: '0.28' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.047, CPAN::Meta::Converter version 2.150001' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: XML-SemanticDiff provides: XML::SemanticDiff: file: lib/XML/SemanticDiff.pm version: '1.0005' XML::SemanticDiff::BasicHandler: file: lib/XML/SemanticDiff/BasicHandler.pm version: '1.0005' XML::SemanticDiff::PathFinder: file: lib/XML/SemanticDiff.pm version: '1.0005' XML::SemanticDiff::PathFinder::Obj: file: lib/XML/SemanticDiff.pm version: '1.0005' requires: Digest::MD5: '0' Encode: '0' XML::Parser: '0' perl: '5.012' strict: '0' warnings: '0' resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=XML-SemanticDiff homepage: http://metacpan.org/release/XML-SemanticDiff repository: https://github.com/shlomif/perl-XML-SemanticDiff.git version: '1.0005' x_Dist_Zilla: perl: version: '5.022003' plugins: - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: test type: requires name: '@Filter/TestMoreDoneTesting' version: '5.047' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Filter/AutoPrereqs' version: '5.047' - class: Dist::Zilla::Plugin::ExecDir name: '@Filter/ExecDir' version: '5.047' - class: Dist::Zilla::Plugin::GatherDir config: Dist::Zilla::Plugin::GatherDir: exclude_filename: [] exclude_match: [] follow_symlinks: 0 include_dotfiles: 0 prefix: '' prune_directory: [] root: . name: '@Filter/GatherDir' version: '5.047' - class: Dist::Zilla::Plugin::ManifestSkip name: '@Filter/ManifestSkip' version: '5.047' - class: Dist::Zilla::Plugin::MetaYAML name: '@Filter/MetaYAML' version: '5.047' - class: Dist::Zilla::Plugin::PruneCruft name: '@Filter/PruneCruft' version: '5.047' - class: Dist::Zilla::Plugin::Readme name: '@Filter/Readme' version: '5.047' - class: Dist::Zilla::Plugin::RunExtraTests config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Filter/RunExtraTests' version: '0.028' - class: Dist::Zilla::Plugin::ShareDir name: '@Filter/ShareDir' version: '5.047' - class: Dist::Zilla::Plugin::Authority name: '@Filter/Authority' version: '1.009' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@Filter/CheckChangesHasContent' version: '0.008' - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Filter/ConfirmRelease' version: '5.047' - class: Dist::Zilla::Plugin::Manifest name: '@Filter/Manifest' version: '5.047' - class: Dist::Zilla::Plugin::MetaConfig name: '@Filter/MetaConfig' version: '5.047' - class: Dist::Zilla::Plugin::MetaJSON name: '@Filter/MetaJSON' version: '5.047' - class: Dist::Zilla::Plugin::MetaProvides::Package config: Dist::Zilla::Plugin::MetaProvides::Package: finder_objects: - class: Dist::Zilla::Plugin::FinderCode name: '@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '5.047' Dist::Zilla::Role::MetaProvider::Provider: Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.001011' inherit_missing: '1' inherit_version: '1' meta_noindex: '1' name: '@Filter/MetaProvides::Package' version: '2.003002' - class: Dist::Zilla::Plugin::MetaResources name: '@Filter/MetaResources' version: '5.047' - class: Dist::Zilla::Plugin::ModuleBuild config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Filter/ModuleBuild' version: '5.047' - class: Dist::Zilla::Plugin::PkgVersion name: '@Filter/PkgVersion' version: '5.047' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Filter/PodCoverageTests' version: '5.047' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Filter/PodSyntaxTests' version: '5.047' - class: Dist::Zilla::Plugin::PodVersion name: '@Filter/PodVersion' version: '5.047' - class: Dist::Zilla::Plugin::Test::Compile config: Dist::Zilla::Plugin::Test::Compile: bail_out_on_fail: '0' fail_on_warning: author fake_home: 0 filename: t/00-compile.t module_finder: - ':InstallModules' needs_display: 0 phase: test script_finder: - ':PerlExecFiles' skips: [] name: '@Filter/Test::Compile' version: '2.054' - class: Dist::Zilla::Plugin::Test::CPAN::Changes name: '@Filter/Test::CPAN::Changes' version: '0.009' - class: Dist::Zilla::Plugin::Test::EOL config: Dist::Zilla::Plugin::Test::EOL: filename: xt/author/eol.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' trailing_whitespace: '1' name: '@Filter/Test::EOL' version: '0.18' - class: Dist::Zilla::Plugin::Test::NoTabs config: Dist::Zilla::Plugin::Test::NoTabs: filename: xt/author/no-tabs.t finder: - ':InstallModules' - ':ExecFiles' - ':TestFiles' name: '@Filter/Test::NoTabs' version: '0.15' - class: Dist::Zilla::Plugin::Test::Kwalitee::Extra name: '@Filter/Test::Kwalitee::Extra' version: v0.2.1 - class: Dist::Zilla::Plugin::Test::TrailingSpace name: '@Filter/Test::TrailingSpace' version: 0.2.0 - class: Dist::Zilla::Plugin::TestRelease name: '@Filter/TestRelease' version: '5.047' - class: Dist::Zilla::Plugin::PodWeaver config: Dist::Zilla::Plugin::PodWeaver: finder: - ':InstallModules' - ':ExecFiles' plugins: - class: Pod::Weaver::Plugin::EnsurePod5 name: '@CorePrep/EnsurePod5' version: '4.013' - class: Pod::Weaver::Plugin::H1Nester name: '@CorePrep/H1Nester' version: '4.013' - class: Pod::Weaver::Section::Generic name: NAME version: '4.013' - class: Pod::Weaver::Section::Version name: Version version: '4.013' - class: Pod::Weaver::Section::Region name: prelude version: '4.013' - class: Pod::Weaver::Section::Generic name: SYNOPSIS version: '4.013' - class: Pod::Weaver::Section::Generic name: DESCRIPTION version: '4.013' - class: Pod::Weaver::Section::Generic name: OVERVIEW version: '4.013' - class: Pod::Weaver::Section::Collect name: ATTRIBUTES version: '4.013' - class: Pod::Weaver::Section::Collect name: METHODS version: '4.013' - class: Pod::Weaver::Section::Leftovers name: Leftovers version: '4.013' - class: Pod::Weaver::Section::Region name: postlude version: '4.013' - class: Pod::Weaver::Section::Authors name: Authors version: '4.013' - class: Pod::Weaver::Section::Legal name: Legal version: '4.013' - class: Pod::Weaver::Section::Bugs name: Bugs version: '4.013' - class: Pod::Weaver::Section::Support name: Support version: '1.007' name: '@Filter/PodWeaver' version: '4.008' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Filter/UploadToCPAN' version: '5.047' - class: Dist::Zilla::Plugin::MetaResources name: MetaResources version: '5.047' - class: Dist::Zilla::Plugin::Prereqs config: Dist::Zilla::Plugin::Prereqs: phase: runtime type: requires name: Runtime version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' version: '5.047' - class: Dist::Zilla::Plugin::FinderCode name: '@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM' version: '5.047' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' version: '5.047' x_authority: cpan:SHLOMIF MANIFEST100644000764000764 144413046137455 16313 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.047. Build.PL Changes LICENSE MANIFEST MANIFEST.SKIP META.json META.yml README dist.ini eg/camelids.xml eg/camelids2.xml eg/xmlsemdiff inc/Test/Run/Builder.pm lib/XML/SemanticDiff.pm lib/XML/SemanticDiff/BasicHandler.pm t/00-compile.t t/01basic.t t/02load_xml.t t/03simple_compare.t t/04namespaces.t t/05simple_handler.t t/06pass_to_handler.t t/07pitest.t t/08nonexist_ns.t t/09two-tags.t t/10wide-chars.t t/11tag-in-different-locations.t t/12missing-element-has-o-as-cdata.t t/13to-doc-read.t t/14ignore_xpath.t t/15ignore_multi.t t/style-trailing-space.t weaver.ini xt/author/eol.t xt/author/no-tabs.t xt/author/pod-coverage.t xt/author/pod-syntax.t xt/release/cpan-changes.t xt/release/kwalitee.t xt/release/trailing-space.t Build.PL100644000764000764 247013046137455 16456 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005 # This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.047. use strict; use warnings; use Module::Build 0.28; my %module_build_args = ( "build_requires" => { "Module::Build" => "0.28" }, "configure_requires" => { "Module::Build" => "0.28" }, "dist_abstract" => "Perl extension for comparing XML documents.", "dist_author" => [ "Shlomi Fish " ], "dist_name" => "XML-SemanticDiff", "dist_version" => "1.0005", "license" => "perl", "module_name" => "XML::SemanticDiff", "recursive_test_files" => 1, "requires" => { "Digest::MD5" => 0, "Encode" => 0, "XML::Parser" => 0, "perl" => "5.012", "strict" => 0, "warnings" => 0 }, "test_requires" => { "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Test" => 0, "Test::More" => "0.88", "blib" => "1.01" } ); my %fallback_build_requires = ( "File::Spec" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Module::Build" => "0.28", "Test" => 0, "Test::More" => "0.88", "blib" => "1.01" ); unless ( eval { Module::Build->VERSION(0.4004) } ) { delete $module_build_args{test_requires}; $module_build_args{build_requires} = \%fallback_build_requires; } my $build = Module::Build->new(%module_build_args); $build->create_build_script; META.json100644000764000764 4030113046137455 16616 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005{ "abstract" : "Perl extension for comparing XML documents.", "author" : [ "Shlomi Fish " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 5.047, CPAN::Meta::Converter version 2.150001", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "XML-SemanticDiff", "prereqs" : { "build" : { "requires" : { "Module::Build" : "0.28" } }, "configure" : { "requires" : { "Module::Build" : "0.28" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Changes" : "0.19", "Test::EOL" : "0", "Test::Kwalitee::Extra" : "0", "Test::More" : "0.96", "Test::NoTabs" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::TrailingSpace" : "0.0203" } }, "runtime" : { "requires" : { "Digest::MD5" : "0", "Encode" : "0", "XML::Parser" : "0", "perl" : "5.012", "strict" : "0", "warnings" : "0" } }, "test" : { "requires" : { "File::Spec" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Test" : "0", "Test::More" : "0.88", "blib" : "1.01" } } }, "provides" : { "XML::SemanticDiff" : { "file" : "lib/XML/SemanticDiff.pm", "version" : "1.0005" }, "XML::SemanticDiff::BasicHandler" : { "file" : "lib/XML/SemanticDiff/BasicHandler.pm", "version" : "1.0005" }, "XML::SemanticDiff::PathFinder" : { "file" : "lib/XML/SemanticDiff.pm", "version" : "1.0005" }, "XML::SemanticDiff::PathFinder::Obj" : { "file" : "lib/XML/SemanticDiff.pm", "version" : "1.0005" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-xml-semanticdiff@rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=XML-SemanticDiff" }, "homepage" : "http://metacpan.org/release/XML-SemanticDiff", "repository" : { "type" : "git", "url" : "https://github.com/shlomif/perl-XML-SemanticDiff.git", "web" : "https://github.com/shlomif/perl-XML-SemanticDiff" } }, "version" : "1.0005", "x_Dist_Zilla" : { "perl" : { "version" : "5.022003" }, "plugins" : [ { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "test", "type" : "requires" } }, "name" : "@Filter/TestMoreDoneTesting", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Filter/AutoPrereqs", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Filter/ExecDir", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::GatherDir", "config" : { "Dist::Zilla::Plugin::GatherDir" : { "exclude_filename" : [], "exclude_match" : [], "follow_symlinks" : 0, "include_dotfiles" : 0, "prefix" : "", "prune_directory" : [], "root" : "." } }, "name" : "@Filter/GatherDir", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Filter/ManifestSkip", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Filter/MetaYAML", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Filter/PruneCruft", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::Readme", "name" : "@Filter/Readme", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Filter/RunExtraTests", "version" : "0.028" }, { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Filter/ShareDir", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::Authority", "name" : "@Filter/Authority", "version" : "1.009" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", "name" : "@Filter/CheckChangesHasContent", "version" : "0.008" }, { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Filter/ConfirmRelease", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Filter/Manifest", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Filter/MetaConfig", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Filter/MetaJSON", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", "config" : { "Dist::Zilla::Plugin::MetaProvides::Package" : { "finder_objects" : [ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.047" } ] }, "Dist::Zilla::Role::MetaProvider::Provider" : { "Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.001011", "inherit_missing" : "1", "inherit_version" : "1", "meta_noindex" : "1" } }, "name" : "@Filter/MetaProvides::Package", "version" : "2.003002" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@Filter/MetaResources", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::ModuleBuild", "config" : { "Dist::Zilla::Role::TestRunner" : { "default_jobs" : 1 } }, "name" : "@Filter/ModuleBuild", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Filter/PkgVersion", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Filter/PodCoverageTests", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Filter/PodSyntaxTests", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::PodVersion", "name" : "@Filter/PodVersion", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", "config" : { "Dist::Zilla::Plugin::Test::Compile" : { "bail_out_on_fail" : "0", "fail_on_warning" : "author", "fake_home" : 0, "filename" : "t/00-compile.t", "module_finder" : [ ":InstallModules" ], "needs_display" : 0, "phase" : "test", "script_finder" : [ ":PerlExecFiles" ], "skips" : [] } }, "name" : "@Filter/Test::Compile", "version" : "2.054" }, { "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", "name" : "@Filter/Test::CPAN::Changes", "version" : "0.009" }, { "class" : "Dist::Zilla::Plugin::Test::EOL", "config" : { "Dist::Zilla::Plugin::Test::EOL" : { "filename" : "xt/author/eol.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ], "trailing_whitespace" : "1" } }, "name" : "@Filter/Test::EOL", "version" : "0.18" }, { "class" : "Dist::Zilla::Plugin::Test::NoTabs", "config" : { "Dist::Zilla::Plugin::Test::NoTabs" : { "filename" : "xt/author/no-tabs.t", "finder" : [ ":InstallModules", ":ExecFiles", ":TestFiles" ] } }, "name" : "@Filter/Test::NoTabs", "version" : "0.15" }, { "class" : "Dist::Zilla::Plugin::Test::Kwalitee::Extra", "name" : "@Filter/Test::Kwalitee::Extra", "version" : "v0.2.1" }, { "class" : "Dist::Zilla::Plugin::Test::TrailingSpace", "name" : "@Filter/Test::TrailingSpace", "version" : "0.2.0" }, { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Filter/TestRelease", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", "config" : { "Dist::Zilla::Plugin::PodWeaver" : { "finder" : [ ":InstallModules", ":ExecFiles" ], "plugins" : [ { "class" : "Pod::Weaver::Plugin::EnsurePod5", "name" : "@CorePrep/EnsurePod5", "version" : "4.013" }, { "class" : "Pod::Weaver::Plugin::H1Nester", "name" : "@CorePrep/H1Nester", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "NAME", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Version", "name" : "Version", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Region", "name" : "prelude", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "SYNOPSIS", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "DESCRIPTION", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Generic", "name" : "OVERVIEW", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "ATTRIBUTES", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Collect", "name" : "METHODS", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Leftovers", "name" : "Leftovers", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Region", "name" : "postlude", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Authors", "name" : "Authors", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Legal", "name" : "Legal", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Bugs", "name" : "Bugs", "version" : "4.013" }, { "class" : "Pod::Weaver::Section::Support", "name" : "Support", "version" : "1.007" } ] } }, "name" : "@Filter/PodWeaver", "version" : "4.008" }, { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Filter/UploadToCPAN", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "MetaResources", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::Prereqs", "config" : { "Dist::Zilla::Plugin::Prereqs" : { "phase" : "runtime", "type" : "requires" } }, "name" : "Runtime", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", "version" : "5.047" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM", "version" : "5.047" } ], "zilla" : { "class" : "Dist::Zilla::Dist::Builder", "config" : { "is_trial" : "0" }, "version" : "5.047" } }, "x_authority" : "cpan:SHLOMIF" } weaver.ini100644000764000764 64213046137455 17133 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005[@CorePrep] [Generic / NAME] [Version] [Region / prelude] [Generic / SYNOPSIS] [Generic / DESCRIPTION] [Generic / OVERVIEW] [Collect / ATTRIBUTES] command = attr [Collect / METHODS] command = method [Leftovers] [Region / postlude] [Authors] [Legal] ; [Generic / DESCRIPTION] ; required = 1 ; [Generic / BUGS] ; [Generic / Section::Bugs] ; [Generic / Section::License] ; [Bugs] [Support] all_modules = 1 t000755000764000764 013046137455 15262 5ustar00shlomifshlomif000000000000XML-SemanticDiff-1.000501basic.t100644000764000764 23513046137455 17011 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse Test; BEGIN { plan tests => 2 } END { ok(0) unless $loaded } use XML::SemanticDiff; $loaded = 1; ok(1); my $diff = XML::SemanticDiff->new(); ok($diff); 07pitest.t100644000764000764 156313046137455 17273 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse Test; BEGIN { plan tests => 3 } use XML::SemanticDiff; $xml1 = <<'EOX'; EOX $xml2 = <<'EOX'; EOX $xml3 = <<'EOX'; EOX my $diff = XML::SemanticDiff->new(); my @results = $diff->compare($xml1, $xml2); ok(@results == 2); @results = $diff->compare($xml1, $xml1); ok(@results == 0); my $full = XML::SemanticDiff->new(keepdata => 1, keeplinenums => 1); @results = $full->compare($xml1, $xml3); #foreach my $msg (@results) { # warn "RES " . $msg->{startline} . "\n"; #} ok(@results == 1); MANIFEST.SKIP100644000764000764 313046137455 16766 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005~$ eg000755000764000764 013046137455 15412 5ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005xmlsemdiff100644000764000764 107713046137455 17640 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/eg#!/usr/bin/perl -w ######################################### # xmlsemdiff -- command-line freindly interface to # XML::SemanticDiff # ######################################## use strict; use XML::SemanticDiff; my $diff = XML::SemanticDiff->new(keeplinenums => 1); my ($file1, $file2) = @ARGV; usage() unless defined $file1 and defined $file2; foreach my $change ($diff->compare($file1, $file2)) { print "$change->{message} (between lines $change->{startline} and $change->{endline})\n"; } sub usage { die "usage: $0 one.xml two.xml \n"; } exit; 02load_xml.t100644000764000764 36213046137455 17531 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse Test; BEGIN { plan tests => 1 } use XML::SemanticDiff; my $diff = XML::SemanticDiff->new(); my $xml1 = qq* Some Text *; my $foo = $diff->read_xml($xml1); ok($foo); 09two-tags.t100644000764000764 72613046137455 17512 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse strict; use warnings; use Test::More tests => 1; use XML::SemanticDiff; my $first_item_is_t = <<"EOF";

T

G

EOF my $first_item_is_f = <<"EOF";

F

G

EOF my $diff = XML::SemanticDiff->new(); my @results = $diff->compare($first_item_is_t, $first_item_is_f); # TEST is (scalar(@results), 1, "Making sure there's one difference in the XML"); 1; 00-compile.t100644000764000764 240513046137455 17455 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.054 use Test::More; plan tests => 2 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'XML/SemanticDiff.pm', 'XML/SemanticDiff/BasicHandler.pm' ); # no fake home requested my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib'; use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; camelids.xml100644000764000764 5215213046137455 20102 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/eg Bactrian Camel 450 to 500 kg. The most noticeable feature of C. bactrianus is its two humps. At the hump, its average height is 213 cm (7 feet). A thick, shaggy, dark brown to beige coat covers the camel during cold weather and is shed when the temperature rises. Longer hair hangs from the neck and gives the appearance of a beard. Bushy eyebrows, a double row of eyelashes, ears lined with hair and the ability to close nostrils and lips tightly serve as protection from harsh conditions. Their tough, even-toed feet help them to cross the rocky desert in Asia and travel well through snow or sand. Camels are herbivores. Their preferred plants are dry, prickly, salty, and/or bitter. When other nutrient sources are not available, the camel may feed on bones, other animals' skin, or different kinds of flesh. In more extreme conditions, they may eat rope, sandals, and even tents. The camel's ability to feed on a wide range of foods allows it to live in areas with sparse vegetation. With tough mouths that can withstand sharp objects such as thorns, the digestion process begins. The first time food is swallowed it is not fully chewed. The partly masticated food (called cud) goes into the stomach and later is brought back up for further chewing. Camels can go for several days without water. When water is available, they drink only to replace what is missing from their body. This amount can vary from nothing to 114 liters. Drinking the whole 114 liters of water takes only ten minutes. The camel also has the ability to quench its thirst with salty or brackish water. In the winter months, plants alone provide water. A common misconception is that the camel's humps are for water storage. In reality, the humps contain a large amount of fat and are use for nourishment when food is scarce. This feature gives the camel the capability to go many days without eating. Each hump can hold up to 36 kg of fat. The hump decreases in size and become flabby as its contents are metabolized. Depletion of the hump is directly linked to the time between eating and the amount of energy expended. Thus, the size of the hump serves as an indication of C. bactrian's health, food supply and general well-being. The stomach is the camel's water storage space. In it, water is retained in several sac-shaped containers. Approximately one and a half gallons of water can be held in the stomach. Mating season occurs in the fall, with inbreeding often involved in domesticated camels. The males during this time are often violent and may bite, spit, or attempt to sit on other male camels. The age of sexual maturity varies, but is usually reached at three to five years. Gestation lasts thirteen months. One or occasionally two calves are produced. The female can give birth to a new calf every other year. The baby calf is precocial, having the ability to stand at birth and walk only a few hours after. The young calf stays with its mother for three to five years, until it reaches sexual maturity. Domestic camels travel in caravans across the desert. An adult male acts as leader for a small group that may consist of six to twenty others. Constantspeed must be maintained at all times while moving. To help ensure this tempo the camels move by pacing. Pacing consists of two legs on the same sideof the body moving at once, creating a rolling motion. This shifts the weight from side to side; a passenger may find this movement very uncomfortable. Camels also have the capability to run and can do so at ten to twenty miles per hour. The camel's habitat consists mainly of Asia's deserts. The temperature ranges from -29 degrees Celsius in the winter to 38 degrees Celsius in the summer. Camels were thought to be extinct in the wild until an expedition found some wild C. bactrianus in the Gobi desert in 1957. These wild groups are in the severedanger of going extinct and little is known about them. The estimated number of wild camels ranges from 500 to 1000. Dromedary, or Arabian Camel 300 to 690 kg. The dromedary camel is characterized by a long-curved neck, deep-narrow chest, and a single hump. The hump is composed of fat bound together by fibrous tissue, acting as food storage in times of need. The size of the hump varies with the nutritional status of the camel, becoming smaller to non-existent during times of starvation. The lips of the dromedary camel are thickened to allow consumption of course, thorny plants. Dromedaries are typically caramel brown or sandy brown in color, however, shades can range from almost black to nearly white. Hair length is longer on the throat, shoulder, and hump areas. The feet of dromedaries are pad-shaped and adapted for traveling on sand. They can be easily injured on sharp stones and are unsuitable for slippery or muddy conditions. Male dromedaries, in comparison to females, are about 10% heavier, weighing 400-600 kg, and are about 10 cm taller at shoulder height, measuring 1.8-2.0 m. Additionally, male dromedaries have an inflatable soft palate which is used to attract females. Dromedary camels have a total of 34 teeth, with a dental formula of 1/3; 1/1; 3/2; 3/3. The dromedary camel is a herbivore. The camel eats primarily thorny plants, dry grasses and saltbush; however, it will eat most anything that grows in the desert (Oakland Zoo 1993). Dromedaries primarily browse, with shrubs and forbs composing up to 70% of their diet. About 8-12 hours/day is spent grazing with equal amounts spent ruminating (Kohler-Rollefson 1991). When foraging, camels tend to spread over large areas and select only a few leaves from each plant. This type of feeding behavior reduces the stress on the plant communities and eases competition with other arid region herbivores (Busch Gardens 1996). Additionally, dromedaries need 6 to 8 times as much salt as other animals for adsorption and storage of water. Consequently, 1/3 of their food intake must be halophytes. Dromedaries browse up to a height of 3.5 m, breaking off branches or stripping off the leaves in one movement. While browsing, they use their lips to grasp the food, then chew each bite 40-50 times. The mouth is kept open while chewing thorny food (Kohler-Rollefson 1991) The dromedary camel has a lifespan of about 40-50 years (Busch Gardens 1996). Females reach sexual maturity around age 3 and mate around age 4 or 5. Males begin to rut by age 3, but do not reach full sexual maturity until age 6. Typically, males and females are seasonal breeders. Breeding occurs in winter and overlaps with the rainy season; both vary in respect to the camel's geographic range. The onset of the breeding season is believed to be cued by nutritional status of the camel and the daylength. During competition for females, the males threaten each other by making low noises with the fleshy fold of their mouths, stand as tall as possible, and repeat a series of head movements including lowering, lifting, and bending their necks backwards. Upon confrontation, fighting males attempt to bring their opponent to the ground by biting at his legs and taking the opponent's head in between his jaws. Copulation time ranges from 7-35 minutes, averaging 11-15 minutes. The gestation period typically lasts for a period of 15 months, followed by the birth of a single calf. The calf can move freely by the end of the first day. Maternal care generally lasts for 1 to 2 years. Calves typically experience a growth rate of .19-.31 kg/day for the first year. (Gauthier-Pilthers and Dagg 1981, Kohler-Rollefson 1991) With the exception of rutting males, dromedaries show very little aggressive behavior. Confrontations among dromedaries include pushing each other with their whole body or lowered head and neck; snapping at each other without biting; and occasionally vomiting cud when they are hurt or excited. Dromedaries usually form groups of 2-20 individuals. The basic social unit is the family, consisting of one male, and one to several females, subadults, and young. The male within the family unit prevents contact between female camels within the family and stray males by either standing or walking in between them, or by driving the stray males away. The male is the dominant member of the family group and directs the family from the rear while the females take turns leading. Dromedaries tend to travel by walking single file. Dromedary camels find comfort in scratching parts of their body with their front or hind legs, or with their lower incisors. They are also often observed rubbing against trees. Additionally, they seem to like to roll in sand (Gauthier-Pilthers and Dagg 1981, Kohler-Rollefson 1991). The camels prefer desert conditions characterized by a long dry season and a short rainy season. Introduction of the dromedary into other climates has proven unsuccessful as the camel is sensitive to the cold and humidity (Nowak 1991). Since the dromedary camel is domesticated, the camel has no special status in conservation (Busch Gardens 1996). Llama 130 to 155 kg. Llamas feet are slender and their limbs are long. They have long, dense fine wool on their bodies. The hair on their head, neck, and limbs is shorter than on their torso. Llamas have remarkable variety in their body sizes and shapes. The larger animals are more prevelant because of their use as "beasts of burden." Body length ranges from 153-200 cm, shoulder height from 100-125 cm, and tail length from 22-25 cm. The coloring of their fur is also variable, ranging from all white, to brown, yellow, blue and black, and sometimes with checks and spots. Llamas are herbivorous, feeding on many kinds of grasses and leaves. Llamas reach sexual maturity at about 12-24 months. Females give birth every other year. Mating occurs in August and September. The gestation period is 348-368 days. Llamas produce one offspring at a time (rarely two). The weight at birth is 8-16 kg. Weaning occurs at 5-8 months. The Lama glama lives only in domestication. They are mostly kept grazing freely on grasslands and scrublands at elevations between 7,400-12,800 ft. (2,300-4,000 m). Llamas are very graceful in their movements. They run with a swinging stride, with their front and hind legs moving in unison on each side. Llamas lie down to rest and sleep. They are adept at spitting regurgitated food. Llamas use certain excretion sites that form dung heaps up to 2.4 meters in diameter. Fighting between males involves leg biting and "neck dominance." Copulation occurs while animals are in a prone position. Llamas are found in deserts, mountainous areas, and grasslands. The population of llamas has declined since road building reduced their importance in transportation. Guanaco 115 to 140 kg. They stand at 1,100 to 1,200mm at the shoulder and have slender bodies with long limbs and neck. The head is typical of camelids with long, pointed ears and cleft, highly mobile lips. Their fur can be long, thick and wooly, especially along the flanks, chest and thighs. It is reddish-brown dorsally, and the underparts are white. Guanacos are herbivores that can inhabit dry areas and forego drinking for long periods. They are versatile foragers, both browsing and grazing on grasses and plants. Females are apparently induced ovulators, and especially in the southern end of the range breeding reaches a peak in February. Young are born in December to February after an eleven month gestation period. They weigh 8-15kg at birth and nurse for eleven to fifteen months. Usually females do not breed until there third year. There are three types of social groups: family groups, male troops, and solitary males. A family band is composed of a single breeding male, several females, and offspring. Males limit the size of their group by driving out young males of six to twelve months and driving off males and sometimes females trying to enter the group. Males defend a territory that the group resides on, and the territory is demarcated by large communal defecation piles. Only about 18% of males are in a family group; the others are in bands or solitary. The all-male bands are generally made up of young males. Males in these herds learn fighting ability through play fights. The solitary males tend to be mature males looking for females or herds to take over. Guanacos inhabit grasslands and shrublands from sea level to 4,000m. Occasionally they winter in forests. Guanacos have had their numbers drastically reduced due to human pressures of habitat encroachment, habitat destruction, and hunting. In addition, climatic changes are also blamed for decreases in population size and range. Vicuna 35 to 65 kg. The vicuna is the smallest living species among the family Camelidae. Head and body length is 1,250-1,900 mm, tail length is 150-250mm, and shoulder height is 700-1,100mm. A slender body and relatively long neck and limbs give a vicuna an elegant appearance. The ears are long, pointed, and narrow. The head is round and yellowish to red-brown in color. The long neck has yellowish red bib. The underside and inner parts of the flanks are dirty white. A strange mane, 20-30cm long, with silky-white hair adorns the chest. Overall, the pelage is uniform and soft. Compared to the similar-looking Lama guanicoe, the vicuna is one fourth the size, its body is paler, and it lacks callosities on the inner sides of the forelimbs. Relative weight of the brain is greater than that of the guanaco. Among living artiodactyls, vicunas have unique, rodent-like incisors that are covered with enamel on only one side. Features believed to be adaptations to high altitudes include a large heart, specialized blood cells with hemoglobin of greater affinty for oxygen, and a weight that is 50 percent heavier than other mammals of the same size. Vision and hearing is good, although the former is far more developed. Olfaction is fairly poor. Nowak (1991), Grizmek (1990). The vicuna is strictly a grazer. Its diet consist of mostly short perennial grasses. The incisors are specially adapted to its diet. They are large and continuously growing as in rodents. The young often graze while lying down. Both young and adults chew cud when they are at rest. Unlike most other camelids, the vicuna requires daily intake of water. Therefore, when selecting a territory, it searches an area with favorable watering sites. The average feeding range is 184ha. Nowak (1991), Grizmek (1990), MacDonald (1984). Mating begins in March and April. They mate while lying down on their chests, and copulation lasts 10-20 minutes. After 330-350 days of gestation period, a female gives birth to a single offspring of 4-6 kg in February and March. The female gives birth in a standing position, and it neither licks nor eats the afterbirth. The mother mates soon after giving birth. The young is mobile after just 15 minutes at birth. It remains close aside its mother for at least 8 months. It continues to suckle until it reaches 10 months. Young females at this stage are expelled from the herd by the dominant male. For young males, this happens at 4-9 months. Expelled females are usually accepted into another group. Females are capable of mating when they reach 2 years. Some are still reproductively active at 19 years. Vicunas in the wild live up to 15-20 years. In captivity, an individual was reported to have lived 24 years. MacDonald (1984), Nowak (1991), Grizmek (1990). Vicunas are alert and shy animals that flee very rapidly. They are capable of running 47 km/hr at an elevation of 4,500 meters. Movement is extremely graceful compared to any other hoofed animal. When in danger, vicunas make a clear, whistling sound. The dominant male warns its herd with an alarm call, and positions itself between the threat and the members. A single dominant male leads a group of females and juveniles. It determines the range of the territory and group membership, and it drives other males away from the family. The territorial male keeps its members closely together at a distance of no more than 160ft. Group members display submission to the male by laying their neck over the back. Family groups are closed societies, excluding alien males and, at times, preventing even young females from joining. The average size of a family is 6-10 individuals depending on the feeding condition in the territory. Vicunas are one of the few ungulates to possess a feeding territory and a separate sleeping territory. They are diurnal, and at night they retreat to their sleeping areas at higher altitudes. Adult males that do not lead any herd become either solitary, or they form a large group of 30 or even 150 individuals. However, there is low cohesiveness among the members of these bachelor herds, and hierarchy is absent. Nowak (1991), Grizmek (1990). Vicunas are found in semiarid rolling grasslands and plains at altitudes of 3,500-5,750 meters. These lands are covered with short and tough vegetation. Due to their daily water demands, vicunas live in areas where water is readily accessible. Climate in the habitat is usually dry and cold. Nowak (1991), Grizmek (1990). The vicuna is classified as vulnerable by the IUCN, and as endangered by the USDI. During the period of the Incas, the total population reached 1.5 million. With the fall of the empire, the number dropped dramatically due to massive slaughter by the conquerors and the settlers. By 1960, the number decreased to only 6,000. Recent efforts of establishing national parks and organizations for protection of vicunas have brought the population back up to 125,000. About half of this number live at the Pampas Galeras National Vicuna Reserve in Peru. Nowak (1991), Grzimek (1990). author000755000764000764 013046137455 16754 5ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/xteol.t100644000764000764 136413046137455 20064 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/xt/authoruse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::EOL 0.18 use Test::More 0.88; use Test::EOL; my @files = ( 'lib/XML/SemanticDiff.pm', 'lib/XML/SemanticDiff/BasicHandler.pm', 't/00-compile.t', 't/01basic.t', 't/02load_xml.t', 't/03simple_compare.t', 't/04namespaces.t', 't/05simple_handler.t', 't/06pass_to_handler.t', 't/07pitest.t', 't/08nonexist_ns.t', 't/09two-tags.t', 't/10wide-chars.t', 't/11tag-in-different-locations.t', 't/12missing-element-has-o-as-cdata.t', 't/13to-doc-read.t', 't/14ignore_xpath.t', 't/15ignore_multi.t', 't/style-trailing-space.t' ); eol_unix_ok($_, { trailing_whitespace => 1 }) foreach @files; done_testing; camelids2.xml100644000764000764 4476513046137455 20177 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/eg Bactrian Camel The most feature of C. bactrianus is its two humps. At the hump, its average height is 213 cm (7 feet). A thick, shaggy, dark brown to beige coat covers the camel during cold weather and is shed when the temperature rises. Longer hair hangs from the neck and gives the appearance of a beard. Bushy eyebrows, a double row of eyelashes, ears lined with hair and the ability to close nostrils and lips tightly serve as protection from harsh conditions. Their tough, even-toed feet help them to cross the rocky desert in Asia and travel well through snow or sand. up to 36 kg of fat. The hump decreases in size and become flabby as its contents are metabolized. Depletion of the hump is directly linked to the time between eating and the amount of energy expended. Thus, the size of the hump serves as an indication of C. bactrian's health, food supply and general well-being. The stomach is the camel's water storage space. In it, water is retained in several sac-shaped containers. Approximately one and a half gallons of water can be held in the stomach. it reaches sexual maturity. The camel's habitat consists mainly of Asia's deserts. The temperature ranges from -29 degrees Celsius in the winter to 38 degrees Celsius in the summer. Camels were thought to be extinct in the wild until an expedition found some wild C. bactrianus in the Gobi desert in 1957. These wild groups are in the severedanger of going extinct and little is known about them. The estimated number of wild camels ranges from 500 to 1000. Dromedary, or Arabian Camel 300 to 690 kg. The dromedary camel is characterized by a long-curved neck, deep-narrow chest, and a single hump. The hump is composed of fat bound together by fibrous tissue, acting as food storage in times of need. The size of the hump varies with the nutritional status of the camel, becoming smaller to non-existent during times of starvation. The lips of the dromedary camel are thickened to allow consumption of course, thorny plants. Dromedaries are typically caramel brown or sandy brown in color, however, shades can range from almost black to nearly white. Hair length is longer on the throat, shoulder, and hump areas. The feet of dromedaries are pad-shaped and adapted for traveling on sand. They can be easily injured on sharp stones and are unsuitable for slippery or muddy conditions. Male dromedaries, in comparison to females, are about 10% heavier, weighing 400-600 kg, and are about 10 cm taller at shoulder height, measuring 1.8-2.0 m. Additionally, male dromedaries have an inflatable soft palate which is used to attract females. Dromedary camels have a total of 34 teeth, with a dental formula of 1/3; 1/1; 3/2; 3/3. The dromedary camel is a herbivore. The camel eats primarily thorny plants, dry grasses and saltbush; however, it will eat most anything that grows in the desert (Oakland Zoo 1993). Dromedaries primarily browse, with shrubs and forbs composing up to 70% of their diet. About 8-12 hours/day is spent grazing with equal amounts spent ruminating (Kohler-Rollefson 1991). When foraging, camels tend to spread over large areas and select only a few leaves from each plant. This type of feeding behavior reduces the stress on the plant communities and eases competition with other arid region herbivores (Busch Gardens 1996). Additionally, dromedaries need 6 to 8 times as much salt as other animals for adsorption and storage of water. Consequently, 1/3 of their food intake must be halophytes. Dromedaries browse up to a height of 3.5 m, breaking off branches or stripping off the leaves in one movement. While browsing, they use their lips to grasp the food, then chew each bite 40-50 times. The mouth is kept open while chewing thorny food (Kohler-Rollefson 1991) The dromedary camel has a lifespan of about 40-50 years (Busch Gardens 1996). Females reach sexual maturity around age 3 and mate around age 4 or 5. Males begin to rut by age 3, but do not reach full sexual maturity until age 6. Typically, males and females are seasonal breeders. Breeding occurs in winter and overlaps with the rainy season; both vary in respect to the camel's geographic range. The onset of the breeding season is believed to be cued by nutritional status of the camel and the daylength. During competition for females, the males threaten each other by making low noises with the fleshy fold of their mouths, stand as tall as possible, and repeat a series of head movements including lowering, lifting, and bending their necks backwards. Upon confrontation, fighting males attempt to bring their opponent to the ground by biting at his legs and taking the opponent's head in between his jaws. Copulation time ranges from 7-35 minutes, averaging 11-15 minutes. The gestation period typically lasts for a period of 15 months, followed by the birth of a single calf. The calf can move freely by the end of the first day. Maternal care generally lasts for 1 to 2 years. Calves typically experience a growth rate of .19-.31 kg/day for the first year. (Gauthier-Pilthers and Dagg 1981, Kohler-Rollefson 1991) With the exception of rutting males, dromedaries show very little aggressive behavior. Confrontations among dromedaries include pushing each other with their whole body or lowered head and neck; snapping at each other without biting; and occasionally vomiting cud when they are hurt or excited. Dromedaries usually form groups of 2-20 individuals. The basic social unit is the family, consisting of one male, and one to several females, subadults, and young. The male within the family unit prevents contact between female camels within the family and stray males by either standing or walking in between them, or by driving the stray males away. The male is the dominant member of the family group and directs the family from the rear while the females take turns leading. Dromedaries tend to travel by walking single file. Dromedary camels find comfort in scratching parts of their body with their front or hind legs, or with their lower incisors. They are also often observed rubbing against trees. Additionally, they seem to like to roll in sand (Gauthier-Pilthers and Dagg 1981, Kohler-Rollefson 1991). The camels prefer desert conditions characterized by a long dry season and a short rainy season. Introduction of the dromedary into other climates has proven unsuccessful as the camel is sensitive to the cold and humidity (Nowak 1991). Since the dromedary camel is domesticated, the camel has no special status in conservation (Busch Gardens 1996). Llama 130 to 155 kg. Llamas feet are slender and their limbs are long. They have long, dense fine wool on their bodies. The hair on their head, neck, and limbs is shorter than on their torso. Llamas have remarkable variety in their body sizes and shapes. The larger animals are more prevelant because of their use as "beasts of burden." Body length ranges from 153-200 cm, shoulder height from 100-125 cm, and tail length from 22-25 cm. The coloring of their fur is also variable, ranging from all white, to brown, yellow, blue and black, and sometimes with checks and spots. Llamas are herbivorous, feeding on many kinds of grasses and leaves. Llamas reach sexual maturity at about 12-24 months. Females give birth every other year. Mating occurs in August and September. The gestation period is 348-368 days. Llamas produce one offspring at a time (rarely two). The weight at birth is 8-16 kg. Weaning occurs at 5-8 months. The Lama glama lives only in domestication. They are mostly kept grazing freely on grasslands and scrublands at elevations between 7,400-12,800 ft. (2,300-4,000 m). Llamas are very graceful in their movements. They run with a swinging stride, with their front and hind legs moving in unison on each side. Llamas lie down to rest and sleep. They are adept at spitting regurgitated food. Llamas use certain excretion sites that form dung heaps up to 2.4 meters in diameter. Fighting between males involves leg biting and "neck dominance." Copulation occurs while animals are in a prone position. Llamas are found in deserts, mountainous areas, and grasslands. The population of llamas has declined since road building reduced their importance in transportation. Guanaco 115 to 140 kg. They stand at 1,100 to 1,200mm at the shoulder and have slender bodies with long limbs and neck. The head is typical of camelids with long, pointed ears and cleft, highly mobile lips. Their fur can be long, thick and wooly, especially along the flanks, chest and thighs. It is reddish-brown dorsally, and the underparts are white. Guanacos are herbivores that can inhabit dry areas and forego drinking for long periods. They are versatile foragers, both browsing and grazing on grasses and plants. Females are apparently induced ovulators, and especially in the southern end of the range breeding reaches a peak in February. Young are born in December to February after an eleven month gestation period. They weigh 8-15kg at birth and nurse for eleven to fifteen months. Usually females do not breed until there third year. There are three types of social groups: family groups, male troops, and solitary males. A family band is composed of a single breeding male, several females, and offspring. Males limit the size of their group by driving out young males of six to twelve months and driving off males and sometimes females trying to enter the group. Males defend a territory that the group resides on, and the territory is demarcated by large communal defecation piles. Only about 18% of males are in a family group; the others are in bands or solitary. The all-male bands are generally made up of young males. Males in these herds learn fighting ability through play fights. The solitary males tend to be mature males looking for females or herds to take over. Guanacos inhabit grasslands and shrublands from sea level to 4,000m. Occasionally they winter in forests. Guanacos have had their numbers drastically reduced due to human pressures of habitat encroachment, habitat destruction, and hunting. In addition, climatic changes are also blamed for decreases in population size and range. Vicuna 35 to 65 kg. The vicuna is the smallest living species among the family Camelidae. Head and body length is 1,250-1,900 mm, tail length is 150-250mm, and shoulder height is 700-1,100mm. A slender body and relatively long neck and limbs give a vicuna an elegant appearance. The ears are long, pointed, and narrow. The head is round and yellowish to red-brown in color. The long neck has yellowish red bib. The underside and inner parts of the flanks are dirty white. A strange mane, 20-30cm long, with silky-white hair adorns the chest. Overall, the pelage is uniform and soft. Compared to the similar-looking Lama guanicoe, the vicuna is one fourth the size, its body is paler, and it lacks callosities on the inner sides of the forelimbs. Relative weight of the brain is greater than that of the guanaco. Among living artiodactyls, vicunas have unique, rodent-like incisors that are covered with enamel on only one side. Features believed to be adaptations to high altitudes include a large heart, specialized blood cells with hemoglobin of greater affinty for oxygen, and a weight that is 50 percent heavier than other mammals of the same size. Vision and hearing is good, although the former is far more developed. Olfaction is fairly poor. Nowak (1991), Grizmek (1990). The vicuna is strictly a grazer. Its diet consist of mostly short perennial grasses. The incisors are specially adapted to its diet. They are large and continuously growing as in rodents. The young often graze while lying down. Both young and adults chew cud when they are at rest. Unlike most other camelids, the vicuna requires daily intake of water. Therefore, when selecting a territory, it searches an area with favorable watering sites. The average feeding range is 184ha. Nowak (1991), Grizmek (1990), MacDonald (1984). Mating begins in March and April. They mate while lying down on their chests, and copulation lasts 10-20 minutes. After 330-350 days of gestation period, a female gives birth to a single offspring of 4-6 kg in February and March. The female gives birth in a standing position, and it neither licks nor eats the afterbirth. The mother mates soon after giving birth. The young is mobile after just 15 minutes at birth. It remains close aside its mother for at least 8 months. It continues to suckle until it reaches 10 months. Young females at this stage are expelled from the herd by the dominant male. For young males, this happens at 4-9 months. Expelled females are usually accepted into another group. Females are capable of mating when they reach 2 years. Some are still reproductively active at 19 years. Vicunas in the wild live up to 15-20 years. In captivity, an individual was reported to have lived 24 years. MacDonald (1984), Nowak (1991), Grizmek (1990). Vicunas are alert and shy animals that flee very rapidly. They are capable of running 47 km/hr at an elevation of 4,500 meters. Movement is extremely graceful compared to any other hoofed animal. When in danger, vicunas make a clear, whistling sound. The dominant male warns its herd with an alarm call, and positions itself between the threat and the members. A single dominant male leads a group of females and juveniles. It determines the range of the territory and group membership, and it drives other males away from the family. The territorial male keeps its members closely together at a distance of no more than 160ft. Group members display submission to the male by laying their neck over the back. Family groups are closed societies, excluding alien males and, at times, preventing even young females from joining. The average size of a family is 6-10 individuals depending on the feeding condition in the territory. Vicunas are one of the few ungulates to possess a feeding territory and a separate sleeping territory. They are diurnal, and at night they retreat to their sleeping areas at higher altitudes. Adult males that do not lead any herd become either solitary, or they form a large group of 30 or even 150 individuals. However, there is low cohesiveness among the members of these bachelor herds, and hierarchy is absent. Nowak (1991), Grizmek (1990). Vicunas are found in semiarid rolling grasslands and plains at altitudes of 3,500-5,750 meters. These lands are covered with short and tough vegetation. Due to their daily water demands, vicunas live in areas where water is readily accessible. Climate in the habitat is usually dry and cold. Nowak (1991), Grizmek (1990). The vicuna is classified as vulnerable by the IUCN, and as endangered by the USDI. During the period of the Incas, the total population reached 1.5 million. With the fall of the empire, the number dropped dramatically due to massive slaughter by the conquerors and the settlers. By 1960, the number decreased to only 6,000. Recent efforts of establishing national parks and organizations for protection of vicunas have brought the population back up to 125,000. About half of this number live at the Pampas Galeras National Vicuna Reserve in Peru. Nowak (1991), Grzimek (1990). 10wide-chars.t100644000764000764 57713046137455 17767 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse strict; use warnings; use Test::More tests => 2; use XML::SemanticDiff; my $diff = XML::SemanticDiff->new(); my $xml_text = <<"EOX"; \x{263A} EOX my @results = eval { $diff->compare($xml_text, $xml_text) }; # TEST is ($@, q{}, "No exceptions were thrown"); # TEST ok ((!@results), q{$xml_text is identical to itself}); 04namespaces.t100644000764000764 151713046137455 20076 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse Test; BEGIN { plan tests => 4 } use XML::SemanticDiff; my $xml1 = <<'EOX'; Some Text EOX my $xml2 = <<'EOX'; Some Text EOX my $xml3 = <<'EOX'; Some Text EOX my $diff = XML::SemanticDiff->new(); my @results = $diff->compare($xml1, $xml2); ok(@results == 0); @results = $diff->compare($xml1, $xml3); ok(@results == 1); ok($results[0]->{context} eq '/root[1]/el1[1]'); ok($results[0]->{message} =~ /namespace/gi); 13to-doc-read.t100644000764000764 57313046137455 20036 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse strict; use warnings; use Test::More tests => 1; use XML::SemanticDiff; my $xml_text = <<'EOF'; Hello There! EOF my $diff = XML::SemanticDiff->new(); my $to_processed_xml = $diff->read_xml($xml_text); my @results = $diff->compare($xml_text, $to_processed_xml); # TEST is_deeply(\@results, [], "Accepted the processed XML in the second argument"); 08nonexist_ns.t100644000764000764 471313046137455 20333 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/t#!/usr/bin/perl -w use strict; use warnings; use Test::More tests => 2; use XML::SemanticDiff; $SIG{__WARN__} = sub { die $_[0]; }; my $xml1 = <<'EOX'; Create a Great Personal Home Site

Books

These are my books.

Fiction books

Little Women by Louisa May Alcott.

Computer books

EOX my $xml2 = <<'EOX'; Create a Great Personal Home Site

Books

These are my books.

Fiction books

Little Women by Louisa May Alcott.

Computer books

EOX my $diff = XML::SemanticDiff->new(); my @results=(qw(Humpty Dumpty sat on a wall)); eval { @results = $diff->compare($xml1, $xml2); }; # TEST is ($@, "", "No exception was thrown"); # TEST ok ((@results == 0), "XML is OK."); 14ignore_xpath.t100644000764000764 130413046137455 20441 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse strict; use warnings; use Test::More tests => 2; use XML::SemanticDiff; my $xml1 = <<'EOX'; Some Text EOX my $xml2 = <<'EOX'; Some Text EOX #TEST { my $diff_simple = XML::SemanticDiff->new(); my @results = $diff_simple->compare($xml1, $xml2); ok(@results, "XMLs are not identical"); } #TEST { my $diff_ignore = XML::SemanticDiff->new(ignorexpath=>["/root/el3"]); my @results = $diff_ignore->compare($xml1, $xml2); ok((!@results), "XMLs should count identical if xpath /root/el3 is excluded"); } 15ignore_multi.t100644000764000764 171313046137455 20454 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse strict; use warnings; use Test::More tests => 3; use XML::SemanticDiff; my $xml1 = <<'EOX'; Some Text EOX my $xml2 = <<'EOX'; Some Text EOX #TEST { my $diff_simple = XML::SemanticDiff->new(); my $results = $diff_simple->compare($xml1, $xml2); ok($results == 2, "Two differences in XMLs"); } #TEST { my $diff_ignore = XML::SemanticDiff->new(ignorexpath=>["/root/el3"]); my $results = $diff_ignore->compare($xml1, $xml2); ok($results == 1, "Only one difference if /root/el3 is excluded"); } #TEST { my $diff_multiignore = XML::SemanticDiff->new(ignorexpath=>["/root/el3", "/root/el4"]); my $results = $diff_multiignore->compare($xml1, $xml2); ok($results == 0, "XMLs should count identical if xpaths /root/el3 and /root/el4 are excluded"); } no-tabs.t100644000764000764 133213046137455 20643 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/xt/authoruse strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::NoTabs 0.15 use Test::More 0.88; use Test::NoTabs; my @files = ( 'lib/XML/SemanticDiff.pm', 'lib/XML/SemanticDiff/BasicHandler.pm', 't/00-compile.t', 't/01basic.t', 't/02load_xml.t', 't/03simple_compare.t', 't/04namespaces.t', 't/05simple_handler.t', 't/06pass_to_handler.t', 't/07pitest.t', 't/08nonexist_ns.t', 't/09two-tags.t', 't/10wide-chars.t', 't/11tag-in-different-locations.t', 't/12missing-element-has-o-as-cdata.t', 't/13to-doc-read.t', 't/14ignore_xpath.t', 't/15ignore_multi.t', 't/style-trailing-space.t' ); notabs_ok($_) foreach @files; done_testing; 05simple_handler.t100644000764000764 172313046137455 20745 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse Test; BEGIN { plan tests => 1 } use XML::SemanticDiff; $xml1 = <<'EOX'; Some Text EOX $xml2 = <<'EOX'; Rogue EOX my $handler = SimpleDiff->new(); my $diff = XML::SemanticDiff->new(diffhandler => $handler); my @results = $diff->compare($xml1, $xml2); ok(@results == 8); package SimpleDiff; use strict; sub new { my ($proto, %args) = @_; my $class = ref($proto) || $proto; my $self = \%args; bless ($self, $class); return $self; } sub init { return 1; } sub rogue_element { return 1; } sub rogue_attribute { return 1; } sub missing_element { return 1; } sub missing_attribute { return 1; } sub attribute_value { return 1; } sub element_value { return 1; } sub namespace_uri { return 1; } sub final { # return 1; } 1; 03simple_compare.t100644000764000764 115313046137455 20751 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse strict; use warnings; use Test::More tests => 2; use XML::SemanticDiff; my $xml1 = <<'EOX'; Some Text EOX my $xml2 = <<'EOX'; Rogue EOX my $diff = XML::SemanticDiff->new(); my @results = $diff->compare($xml1, $xml2); # TEST is (scalar(@results), 6, "Number of results in comparing two different XML texts" ); @results = $diff->compare($xml1, $xml1); # TEST ok ((!@results), "Identical XMLs generate identical results"); 06pass_to_handler.t100644000764000764 323013046137455 21120 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse Test; BEGIN { plan tests => 1 } use XML::SemanticDiff; $xml1 = <<'EOX'; Some Text EOX $xml2 = <<'EOX'; Rogue EOX my $handler = BetterDiff->new(); my $diff = XML::SemanticDiff->new(diffhandler => $handler); my @results = $diff->compare($xml1, $xml2); ok(@results == 6); package BetterDiff; use strict; sub new { my ($proto, %args) = @_; my $class = ref($proto) || $proto; my $self = \%args; bless ($self, $class); return $self; } sub rogue_element { my $self = shift; my ($element_path, $new_element) = @_; return 1 if $element_path and $new_element; } sub rogue_attribute { my $self = shift; my ($attr, $element_path, $new_element, $old_element) = @_; return 1 if $attr and $element_path and $new_element and $old_element; } sub missing_element { my $self = shift; my ($element_path, $old_element) = @_; return 1 if $element_path and $old_element; } sub missing_attribute { my $self = shift; my ($attr, $element_path, $new_element, $old_element) = @_; return 1 if $attr and $element_path and $new_element and $old_element; } sub attribute_value { my $self = shift; my ($attr, $element_path, $new_element, $old_element) = @_; return 1 if $attr and $element_path and $new_element and $old_element; } sub element_value { my $self = shift; my ($element_path, $new_element, $old_element) = @_; return 1 if $element_path and $new_element and $old_element; } sub namespace_uri { return 1; } 1; release000755000764000764 013046137455 17072 5ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/xtkwalitee.t100644000764000764 46313046137455 21207 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/xt/release#!perl # This test is generated by Dist::Zilla::Plugin::Test::Kwalitee::Extra use strict; use warnings; use Test::More; # needed to provide plan. eval { require Test::Kwalitee::Extra }; plan skip_all => "Test::Kwalitee::Extra required for testing kwalitee: $@" if $@; eval "use Test::Kwalitee::Extra"; pod-syntax.t100644000764000764 25213046137455 21366 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/xt/author#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); XML000755000764000764 013046137455 16225 5ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/libSemanticDiff.pm100644000764000764 5356213046137455 21312 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/lib/XMLpackage XML::SemanticDiff; our $AUTHORITY = 'cpan:SHLOMIF'; use strict; use warnings; use 5.012; our $VERSION = '1.0005'; use XML::Parser; sub new { my ($proto, %args) = @_; my $class = ref($proto) || $proto; my $self = \%args; require XML::SemanticDiff::BasicHandler unless defined $args{diffhandler}; bless ($self, $class); return $self; } sub _is_file { my ($self, $specifier) = @_; return $specifier !~ /\n/g && -f $specifier; } sub _get_pathfinder_obj { my $self = shift; return XML::SemanticDiff::PathFinder::Obj->new(); } sub read_xml { my $self = shift; my ($xml_specifier) = @_; if (ref($xml_specifier) eq 'HASH') { return $xml_specifier; } else { $self->{path_finder_obj} = $self->_get_pathfinder_obj(); my $p = XML::Parser->new( Style => 'Stream', Pkg => 'XML::SemanticDiff::PathFinder', 'Non-Expat-Options' => $self, Namespaces => 1 ); my $ret = $self->_is_file($xml_specifier) ? $p->parsefile($xml_specifier) : $p->parse($xml_specifier) ; $self->{path_finder_obj} = undef; return $ret; } } sub _same_namespace { my ($self, $to, $from) = @_; my $t_e = exists($to->{NamespaceURI}); my $f_e = exists($from->{NamespaceURI}); if (!$t_e && !$f_e) { return 1; } elsif ($t_e && $f_e) { return ($to->{NamespaceURI} eq $from->{NamespaceURI}); } else { return 0; } } sub _match_xpath { my $self = shift; my ($xpath, $flat_name) = @_; my @x_way = split /\//, $xpath; my @f_way = split /\//, $flat_name; for my $i (0..$#x_way) { $x_way[$i]=~s/.*?://g; } for my $i (0..$#f_way) { $f_way[$i]=~s/\[.*?\]$//g; } return 0 if $#x_way > $#f_way; for my $i (0..$#x_way) { if ($x_way[$i] ne $f_way[$i]) { return 0; } } return 1; } # Okay, it's pretty basic... # # We flatten each doc tree to a Perl hash where the keys are "fully qualified" # XPath expressions (/root[1]/element[3]) that represent the unique location # of each XML element, then compare the two hashes. # # Just loop over all the elements of the first hash- if the same key exists # in the second, you compare the text and attributes and delete it. Any # keys not found in the second hash are declared 'missing', and any keys leftover # in the second hash after looping through the elements in the first are 'rogues'. sub compare { my $self = shift; my ($from_xml, $to_xml) = @_; my $from_doc = $self->read_xml($from_xml); my $to_doc = $self->read_xml($to_xml); my @warnings = (); my $handler = $self->{diffhandler} || XML::SemanticDiff::BasicHandler->new(%$self); # drop away nodes matching xpaths to be ignored if (defined $self->{ignorexpath}) { my $ignore = $self->{ignorexpath}; for my $path (@$ignore) { for my $ref ($from_doc, $to_doc) { for my $key (keys %$ref) { if ($self->_match_xpath($path, $key)) { delete $ref->{$key}; } } } } } # fire the init handler push (@warnings, $handler->init($self)) if $handler->can('init'); # loop the elements foreach my $element (sort keys (%$from_doc)) { # element existence check if (defined $to_doc->{$element}) { # element value test unless ($from_doc->{$element}->{TextChecksum} eq $to_doc->{$element}->{TextChecksum}) { push (@warnings, $handler->element_value($element, $to_doc->{$element}, $from_doc->{$element})) if $handler->can('element_value'); } # namespace test unless ($self->_same_namespace($from_doc->{$element},$to_doc->{$element})) { push (@warnings, $handler->namespace_uri($element, $to_doc->{$element}, $from_doc->{$element})) if $handler->can('namespace_uri'); } # attribute tests foreach my $attr (keys(%{$from_doc->{$element}->{Attributes}})) { # attr existence check if (defined ($to_doc->{$element}->{Attributes}->{$attr})) { # attr value test if ($to_doc->{$element}->{Attributes}->{$attr} ne $from_doc->{$element}->{Attributes}->{$attr}){ push (@warnings, $handler->attribute_value($attr, $element, $to_doc->{$element}, $from_doc->{$element})) if $handler->can('attribute_value'); } delete $to_doc->{$element}->{Attributes}->{$attr}; } else { push (@warnings, $handler->missing_attribute($attr, $element, $to_doc->{$element}, $from_doc->{$element})) if $handler->can('missing_attribute'); } } # rogue attrs foreach my $leftover (keys(%{$to_doc->{$element}->{Attributes}})) { push (@warnings, $handler->rogue_attribute($leftover, $element, $to_doc->{$element}, $from_doc->{$element})) if $handler->can('rogue_attribute'); } delete $to_doc->{$element}; } else { push (@warnings, $handler->missing_element($element, $from_doc->{$element})) if $handler->can('missing_element'); } } # rogue elements foreach my $leftover ( keys (%$to_doc) ) { push (@warnings, $handler->rogue_element($leftover, $to_doc->{$leftover})) if $handler->can('rogue_element'); } push (@warnings, $handler->final($self)) if $handler->can('final'); return @warnings; } 1; package XML::SemanticDiff::PathFinder; our $AUTHORITY = 'cpan:SHLOMIF'; foreach my $func (qw(StartTag EndTag Text StartDocument EndDocument PI)) { no strict 'refs'; *{__PACKAGE__.'::'.$func} = sub { my $expat = shift; return $expat->{'Non-Expat-Options'}->{path_finder_obj}->$func( $expat, @_ ); }; } package XML::SemanticDiff::PathFinder::Obj; our $AUTHORITY = 'cpan:SHLOMIF'; use strict; use Digest::MD5 qw(md5_base64); use Encode qw(encode_utf8); foreach my $accessor (qw(descendents char_accumulator doc opts xml_context PI_position_index)) { no strict 'refs'; *{__PACKAGE__.'::'.$accessor} = sub { my $self = shift; if (@_) { $self->{$accessor} = shift; } return $self->{$accessor}; }; } # PI_position_index is the position index for the PI's below - the processing # instructions. sub new { my $class = shift; my $self = {}; bless $self, $class; $self->_init(@_); return $self; } sub _init { return 0; } sub StartTag { my ($self, $expat, $element) = @_; my %attrs = %_; my @context = $expat->context; my $context_length = scalar (@context); my $parent = $context[$context_length -1]; push (@{$self->descendents()->{$parent}}, $element) if $parent; my $last_ctx_elem = $self->xml_context()->[-1] || { position_index => {}}; push @{$self->xml_context()}, { element => "$element", 'index' => ++$last_ctx_elem->{position_index}->{"$element"}, position_index => {}, }; my $test_context; # if (@context){ # $test_context = '/' . join ('/', map { $_ . '[' . $position_index->{$_} . ']' } @context); # } # $test_context .= '/' . $element . '[' . $position_index->{$element} . ']'; $test_context = $self->_calc_test_context(); $self->doc()->{$test_context} = { NamespaceURI => ($expat->namespace($element) || ""), Attributes => \%attrs, ($self->opts()->{keeplinenums} ? ( TagStart => $expat->current_line) : () ), }; } sub _calc_test_context { my $self = shift; return join("", map { "/". $_->{'element'} . "[" . $_->{'index'} . "]" } @{$self->xml_context()} ); } sub EndTag { my ($self, $expat, $element) = @_; my @context = $expat->context; # if (@context){ # $test_context = '/' . join ('/', map { $_ . '[' . $position_index->{$_} . ']' } @context); #} # $test_context .= '/' . $element . '[' . $position_index->{$element} . ']'; my $test_context = $self->_calc_test_context(); my $text; if ( defined( $self->char_accumulator()->{$element} )) { $text = $self->char_accumulator()->{$element}; delete $self->char_accumulator()->{$element}; } $text ||= 'o'; # warn "text is '$text' \n"; # my $ctx = Digest::MD5->new; # $ctx->add("$text"); # $self->doc()->{"$test_context"}->{TextChecksum} = $ctx->b64digest; $self->doc()->{"$test_context"}->{TextChecksum} = md5_base64(encode_utf8("$text")); if ($self->opts()->{keepdata}) { $self->doc()->{"$test_context"}->{CData} = $text; } if (defined ( $self->descendents()->{$element})) { my $seen = {}; foreach my $child (@{$self->descendents()->{$element}}) { next if $seen->{$child}; $seen->{$child}++; } } $self->doc()->{"$test_context"}->{TagEnd} = $expat->current_line if $self->opts()->{keeplinenums}; pop(@{$self->xml_context()}); } sub Text { my $self = shift; my $expat = shift; my $element = $expat->current_element; my $char = $_; $char =~ s/^\s*//; $char =~ s/\s*$//; $char =~ s/\s+/ /g; $self->char_accumulator()->{$element} .= $char if $char; } sub StartDocument { my $self = shift; my $expat = shift; $self->doc({}); $self->descendents({}); $self->char_accumulator({}); $self->opts($expat->{'Non-Expat-Options'}); $self->xml_context([]); $self->PI_position_index({}); } sub EndDocument { my $self = shift; return $self->doc(); } sub PI { my ($self, $expat, $target, $data) = @_; my $attrs = {}; $self->PI_position_index()->{$target}++; foreach my $pair (split /\s+/, $data) { $attrs->{$1} = $2 if $pair =~ /^(.+?)=["'](.+?)["']$/; } my $slug = '?' . $target . '[' . $self->PI_position_index()->{$target} . ']'; $self->doc()->{$slug} = { Attributes => ($attrs || {}), TextChecksum => "1", NamespaceURI => "", ( $self->opts()->{keeplinenums} ? ( TagStart => $expat->current_line(), TagEnd => $expat->current_line(), ) : () ), }; } 1; __END__ =pod =head1 NAME XML::SemanticDiff - Perl extension for comparing XML documents. =head1 VERSION version 1.0005 =head1 SYNOPSIS use XML::SemanticDiff; my $diff = XML::SemanticDiff->new(); foreach my $change ($diff->compare($file, $file2)) { print "$change->{message} in context $change->{context}\n"; } # or, if you want line numbers: my $diff = XML::SemanticDiff->new(keeplinenums => 1); foreach my $change ($diff->compare($file, $file2)) { print "$change->{message} (between lines $change->{startline} and $change->{endline})\n"; } =head1 DESCRIPTION XML::SematicDiff provides a way to compare the contents and structure of two XML documents. By default, it returns a list of hashrefs where each hashref describes a single difference between the two docs. =head1 VERSION version 1.0005 =head1 METHODS =head2 $obj->new([%options]) Ye olde object constructor. The new() method recognizes the following options: =over 4 =item * keeplinenums When this option is enabled XML::SemanticDiff will add the 'startline' and 'endline' properties (containing the line numbers for the reported element's start tag and end tag) to each warning. For attribute events these numbers reflect the start and end tags of the element which contains that attribute. =item * keepdata When this option is enabled XML::SemanticDiff will add the 'old_value' and 'new_value' properties to each warning. These properties contain, surprisingly, the old and new values for the element or attribute being reported. In the case of missing elements or attributes (those in the first document, not in the second) only the 'old_value' property will be defined. Similarly, in the case of rogue elements or attributes (those in the second document but not in the first) only the 'new_value' property will be defined. Note that using this option will greatly increase the amount of memory used by your application. =item * diffhandler Taking a blessed object as it's sole argument, this option provides a way to hook the basic semantic diff engine into your own custom handler class. Please see the section on 'CUSTOM HANDLERS' below. =item * ignorexpath This option takes array of strings as argument. Strings are interpreted as simple xpath expressions. Nodes matching these expressions are ignored during comparison. All xpath expressions should be absolute (start with '/'). Current implementation ignores namespaces during comparison. =back =head2 @results = $differ->compare($xml1, $xml2) Compares the XMLs $xml1 and $xml2 . $xml1 and $xml2 can be: =over 4 =item * filenames This will be considered if it is a string that does not contain newlines and exists in the filesystem. =item * the XML text itself. This will be considered if it's any kind of string. =item * the results of read_xml(). (see below) This will be considered if it's a hash reference. =back =head2 my $doc = read_xml($xml_location) This will read the XML, process it for comparison and return it. See compare() for how it is determined. =head1 CUSTOM HANDLERS Internally, XML::SemanticDiff uses an event-based model somewhat reminiscent of SAX where the various 'semantic diff events' are handed off to a separate handler class to cope with the details. For most general cases where the user only cares about reporting the differences between two docs, the default handler, XML::SemanticDiff::BasicHandler, will probably suffice. However, it is often desirable to add side-effects to the diff process (updating datastores, widget callbacks, etc.) and a custom handler allows you to be creative with what to do about differences between two XML documents and how those differences are reported back to the application through the compare() method. =head1 HANDLER METHODS The following is a list of handler methods that can be used for your custom diff-handler class. =head2 init($self, $diff_obj) The C method is called immediately before the the two document HASHes are compared. The blessed XML::SemanticDiff object is passed as the sole argument, so any values that you wish to pass from your application to your custom handler can safely be added to the call to XML::SemanticDiff's constructor method. =head2 rogue_element($self, $element_name, $todoc_element_properties) The C method handles those cases where a given element exists in the to-file but not in the from-file. =head2 missing_element($self, $element_name, $fromdoc_element_properties) The C method handles those cases where a given element exists in the from-file but not in the to-file. =head2 element_value($self, $element, $to_element_properties, $fromdoc_element_properties) The C method handles those cases where the text data differs between two elements that have the same name, namespace URI, and are at the same location in the document tree. Note that all whitespace is normalized and the text from mixed-content elements (those containing both text and child elements mixed together) is aggregated down to a single value. =head2 namespace_uri($self, $element, $todoc_element_properties, $fromdoc_element_properties) The C method handles case where the XML namespace URI differs between a given element in the two documents. Note that the namespace URI is checked, not the element prefixes since and are all considered equivalent as long as they are bound to the same namespace URI. =head2 rogue_attribute($self, $attr_name, $element, $todoc_element_properties) The C method handles those cases where an attribute exists in a given element the to-file but not in the from-file. =head2 missing_attribute($self, $attr_name, $element, $todoc_element_properties, $fromdoc_element_properties) The C method handles those cases where an attribute exists in a given element exists in the from-file but not in the to-file. =head2 attribute_value($self, $attr_name, $element, $todoc_element_properties, $fromdoc_element_properties) The C method handles those cases where the value of an attribute varies between the same element in both documents. =head2 final($self, $diff_obj) The C method is called immediately after the two document HASHes are compared. Like the C handler, it is passed a copy of the XML::SemanticDiff object as it's sole argument. Note that if a given method is not implemented in your custom handler class, XML::SemanticDiff will not complain; but it means that all of those events will be silently ignored. Consider yourself warned. =head1 AUTHOR Originally by Kip Hampton, khampton@totalcinema.com . Further Maintained by Shlomi Fish, L . =head1 COPYRIGHT Copyright (c) 2000 Kip Hampton. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Shlomi Fish hereby disclaims any implicit or explicit copyrights on this software. =head1 LICENSE This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO perl(1). =head1 AUTHOR Shlomi Fish =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2001 by Kim Hampton. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 BUGS Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/Public/Dist/Display.html?Name=XML-SemanticDiff or by email to bug-xml-semanticdiff@rt.cpan.org. When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Perldoc You can find documentation for this module with the perldoc command. perldoc XML::SemanticDiff =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * Search CPAN The default CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * AnnoCPAN The AnnoCPAN is a website that allows community annotations of Perl module documentation. L =item * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. L =item * CPAN Forum The CPAN Forum is a web forum for discussing Perl modules. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone https://github.com/shlomif/perl-XML-SemanticDiff.git =cut Run000755000764000764 013046137455 17253 5ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/inc/TestBuilder.pm100644000764000764 262613046137455 21345 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/inc/Test/Runpackage Test::Run::Builder; use strict; use warnings; use Module::Build; use vars qw(@ISA); @ISA = (qw(Module::Build)); sub ACTION_runtest { my ($self) = @_; my $p = $self->{properties}; $self->depends_on('code'); local @INC = @INC; # Make sure we test the module in blib/ unshift @INC, (File::Spec->catdir($p->{base_dir}, $self->blib, 'lib'), File::Spec->catdir($p->{base_dir}, $self->blib, 'arch')); $self->do_test_run_tests; } sub ACTION_distruntest { my ($self) = @_; $self->depends_on('distdir'); my $start_dir = $self->cwd; my $dist_dir = $self->dist_dir; chdir $dist_dir or die "Cannot chdir to $dist_dir: $!"; # XXX could be different names for scripts $self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile or die "Error executing 'Build.PL' in dist directory: $!"; $self->run_perl_script('Build') or die "Error executing 'Build' in dist directory: $!"; $self->run_perl_script('Build', [], ['runtest']) or die "Error executing 'Build test' in dist directory"; chdir $start_dir; } sub do_test_run_tests { my $self = shift; require Test::Run::CmdLine::Iface; my $test_run = Test::Run::CmdLine::Iface->new( { 'test_files' => [glob("t/*.t")], } # 'backend_params' => $self->_get_backend_params(), ); return $test_run->run(); } 1; style-trailing-space.t100644000764000764 73413046137455 21633 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/t#!/usr/bin/perl use strict; use warnings; use Test::More; eval "use Test::TrailingSpace"; if ($@) { plan skip_all => "Test::TrailingSpace required for trailing space test."; } else { plan tests => 1; } my $finder = Test::TrailingSpace->new( { root => '.', filename_regex => qr/(?:(?:\.(?:t|pm|pl|PL|yml|json|arc|vim|xml))|README|Changes|LICENSE|MANIFEST)\z/, }, ); # TEST $finder->no_trailing_space( "No trailing space was found." ); pod-coverage.t100644000764000764 33413046137455 21634 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/xt/author#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); cpan-changes.t100644000764000764 26313046137455 21727 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/xt/release#!perl use strict; use warnings; use Test::More 0.96 tests => 2; use_ok('Test::CPAN::Changes'); subtest 'changes_ok' => sub { changes_file_ok('Changes'); }; done_testing(); trailing-space.t100644000764000764 103413046137455 22317 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/xt/release#!perl use strict; use warnings; use Test::More; eval "use Test::TrailingSpace"; if ($@) { plan skip_all => "Test::TrailingSpace required for trailing space test."; } else { plan tests => 1; } # TODO: add .pod, .PL, the README/Changes/TODO/etc. documents and possibly # some other stuff. my $finder = Test::TrailingSpace->new( { root => '.', filename_regex => qr#(?:\.(?:t|pm|pl|xs|c|h|txt|pod|PL)|README|Changes|TODO|LICENSE)\z#, }, ); # TEST $finder->no_trailing_space( "No trailing space was found." ); 11tag-in-different-locations.t100644000764000764 252313046137455 23067 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/tuse strict; use warnings; use Test::More tests => 1; use XML::SemanticDiff; my $orig = <<'EOF'; This presentation is a brief overview of the MediaLandscape Product and Service Offerings. 19 Central Time (GMT-06:00) Central Time (US & Canada) CST EOF my $derived = <<'EOF'; (GMT-06:00) Central Time (US & Canada) CST 19 Central Time This presentation is a brief overview of the MediaLandscape Product and Service Offerings. EOF my $diff = XML::SemanticDiff->new(); my @results = $diff->compare($orig, $derived); # TEST is_deeply ( \@results, [], "Making sure two XMLs with variation of tag locations are considered identical - per bug #18491" ); SemanticDiff000755000764000764 013046137455 20561 5ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/lib/XMLBasicHandler.pm100644000764000764 2167013046137455 23624 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/lib/XML/SemanticDiffpackage XML::SemanticDiff::BasicHandler; our $AUTHORITY = 'cpan:SHLOMIF'; use strict; use warnings; our $VERSION = '1.0005'; sub new { my ($proto, %args) = @_; my $class = ref($proto) || $proto; my $self = \%args; bless ($self, $class); return $self; } sub rogue_element { my $self = shift; my ($element, $properties) = @_; my ($element_name, $parent) = parent_and_name($element); my $info = {context => $parent, message => "Rogue element '$element_name' in element '$parent'."}; if ($self->{keeplinenums}) { $info->{startline} = $properties->{TagStart}; $info->{endline} = $properties->{TagEnd}; } if ($self->{keepdata}) { $info->{new_value} = $properties->{CData}; } return $info; } sub missing_element { my $self = shift; my ($element, $properties) = @_; my ($element_name, $parent) = parent_and_name($element); my $info = {context => $parent, message => "Child element '$element_name' missing from element '$parent'."}; if ($self->{keeplinenums}) { $info->{startline} = $properties->{TagStart}; $info->{endline} = $properties->{TagEnd}; } if ($self->{keepdata}) { $info->{old_value} = $properties->{CData}; } return $info; } sub element_value { my $self = shift; my ($element, $new_properties, $old_properties) = @_; my ($element_name, $parent) = parent_and_name($element); my $info = {context => $element, message => "Character differences in element '$element_name'."}; if ($self->{keeplinenums}) { $info->{startline} = $new_properties->{TagStart}; $info->{endline} = $new_properties->{TagEnd}; } if ($self->{keepdata}) { $info->{old_value} = $old_properties->{CData}; $info->{new_value} = $new_properties->{CData}; } return $info; } sub rogue_attribute { my $self = shift; my ($attr, $element, $properties) = @_; my ($element_name, $parent) = parent_and_name($element); my $info = {context => $element, message => "Rogue attribute '$attr' in element '$element_name'."}; if ($self->{keeplinenums}) { $info->{startline} = $properties->{TagStart}; $info->{endline} = $properties->{TagEnd}; } if ($self->{keepdata}) { $info->{new_value} = $properties->{Attributes}->{$attr}; } return $info; } sub missing_attribute { my $self = shift; my ($attr, $element, $new_properties, $old_properties) = @_; my ($element_name, $parent) = parent_and_name($element); my $info = {context => $element, message => "Attribute '$attr' missing from element '$element_name'."}; if ($self->{keeplinenums}) { $info->{startline} = $new_properties->{TagStart}; $info->{endline} = $new_properties->{TagEnd}; } if ($self->{keepdata}) { $info->{old_value} = $old_properties->{Attributes}->{$attr}; } return $info; } sub attribute_value { my $self = shift; my ($attr, $element, $new_properties, $old_properties) = @_; my ($element_name, $parent) = parent_and_name($element); my $info = {context => $element, message => "Attribute '$attr' has different value in element '$element_name'."}; if ($self->{keeplinenums}) { $info->{startline} = $new_properties->{TagStart}; $info->{endline} = $new_properties->{TagEnd}; } if ($self->{keepdata}) { $info->{old_value} = $old_properties->{Attributes}->{$attr}; $info->{new_value} = $new_properties->{Attributes}->{$attr}; } return $info; } sub namespace_uri { my $self = shift; my ($element, $new_properties, $old_properties) = @_; my ($element_name, $parent) = parent_and_name($element); my $info = {context => $element, message => "Element '$element_name' within different namespace."}; if ($self->{keeplinenums}) { $info->{startline} = $new_properties->{TagStart}; $info->{endline} = $new_properties->{TagEnd}; } if ($self->{keepdata}) { $info->{old_value} = $old_properties->{NamspaceURI}; $info->{new_value} = $new_properties->{NamspaceURI}; } return $info; } sub parent_and_name { my $element = shift; my @steps = split('/', $element); my $element_name = pop (@steps); my $parent = join '/', @steps; $element_name =~ s/\[\d+\]$//; return ($element_name, $parent); } 1; __END__ =pod =head1 NAME XML::SemanticDiff::BasicHandler - Default handler class for XML::SemanticDiff =head1 VERSION version 1.0005 =head1 SYNOPSIS use XML::SemanticDiff; my $diff = XML::SemanticDiff->new(); foreach my $change ($diff->compare($file, $file2)) { print "$change->{message} in context $change->{context}\n"; } =head1 DESCRIPTION This is the default event handler for XML::SemanticDiff. It implements nothing useful apart from the parent class and should never be used directly. Please run perldoc XML::SemanticDiff for more information. =head1 VERSION version 1.0005 =head1 IMPLEMENTED METHODS (FOR INTERNAL USE) =head2 new =head2 rogue_element =head2 missing_element =head2 element_value =head2 rogue_attribute =head2 missing_attribute =head2 attribute_value =head2 namespace_uri =head2 parent_and_name =head1 AUTHOR Kip Hampton khampton@totalcinema.com =head1 COPYRIGHT Copyright (c) 2000 Kip Hampton. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO XML::SemanticDiff =head1 AUTHOR Shlomi Fish =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2001 by Kim Hampton. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =head1 BUGS Please report any bugs or feature requests on the bugtracker website http://rt.cpan.org/Public/Dist/Display.html?Name=XML-SemanticDiff or by email to bug-xml-semanticdiff@rt.cpan.org. When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Perldoc You can find documentation for this module with the perldoc command. perldoc XML::SemanticDiff =head2 Websites The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources. =over 4 =item * MetaCPAN A modern, open-source CPAN search engine, useful to view POD in HTML format. L =item * Search CPAN The default CPAN search engine, useful to view POD in HTML format. L =item * RT: CPAN's Bug Tracker The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN. L =item * AnnoCPAN The AnnoCPAN is a website that allows community annotations of Perl module documentation. L =item * CPAN Ratings The CPAN Ratings is a website that allows community ratings and reviews of Perl modules. L =item * CPAN Forum The CPAN Forum is a web forum for discussing Perl modules. L =item * CPANTS The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution. L =item * CPAN Testers The CPAN Testers is a network of smokers who run automated tests on uploaded CPAN distributions. L =item * CPAN Testers Matrix The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms. L =item * CPAN Testers Dependencies The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution. L =back =head2 Bugs / Feature Requests Please report any bugs or feature requests by email to C, or through the web interface at L. You will be automatically notified of any progress on the request by the system. =head2 Source Code The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :) L git clone https://github.com/shlomif/perl-XML-SemanticDiff.git =cut 12missing-element-has-o-as-cdata.t100644000764000764 206313046137455 23533 0ustar00shlomifshlomif000000000000XML-SemanticDiff-1.0005/t# This is a regression test file for bug: # # http://rt.cpan.org/Ticket/Display.html?id=2322 # # It seems to already have been fixed by the time this test was written. use strict; use warnings; use Test::More tests => 1; use XML::SemanticDiff; package MyDiffHandler; sub new { my $class = shift; my $self = {}; bless $self, $class; $self->{save_CData} = []; return $self; } sub missing_element { my $self = shift; my ($elem, $properties) = @_; push @{$self->{save_CData}}, { cdata => $properties->{CData} }; return {}; } package main; my $handler = MyDiffHandler->new(); my $diff = XML::SemanticDiff->new(diffhandler => $handler); my $xml_with_empty_element = <<'EOF'; Quark EOF my $xml_without_empty_element = <<'EOF'; Quark EOF my @results = $diff->compare( $xml_with_empty_element, $xml_without_empty_element, ); # TEST is_deeply ($handler->{save_CData}, [ { cdata => undef } ], "Testing that the cdata for an empty element is the empty string." );