Tree::Compat - a compatibility layer for Tree
use Tree::Compat 'Tree::Simple'; # or ... use Tree::Compat; Tree::Compat->load( 'Tree::Simple' );
This is meant to be a compatibility layer to aid in transition from various other Tree::* modules to Tree. As part of the transition, the REAL_TREE() method is provided in all the compatibility layers in order to access the Tree object underneath.
This will load the compatibility layer for $pkg_name. If one hasn't been written yet, then load() will die.
$pkg_name
Compats have been written for:
Tree::DAG_Node
Tree::Nary
Tree::Simple
These compatibility layers provide compatibility with the published API of the specific module. If your code uses anything that begins with an underscore or directly accesses the internal state of the object, YOUR CODE WILL BREAK, and it will probably break at run-time.
In addition, the compatibility layer will most likely be slower than the original code. There's at least one (and often more) layer(s) of indirection involved in a true compatibility layer, especially between two modules with differing design philosophies.
We use Devel::Cover to test the code coverage of our tests. Below is the Devel::Cover report on this module's test suite.
---------------------------- ------ ------ ------ ------ ------ ------ ------ File stmt bran cond sub pod time total ---------------------------- ------ ------ ------ ------ ------ ------ ------ blib/lib/Tree/Compat.pm 94.1 50.0 n/a 100.0 100.0 0.5 88.9 ...ree/Compat/Tree/Simple.pm 96.8 94.2 100.0 89.7 93.3 99.5 95.3 Total 96.6 92.2 100.0 90.9 93.5 100.0 94.9 ---------------------------- ------ ------ ------ ------ ------ ------ ------
The mailing list is at TreeCPAN@googlegroups.com. I also read http://www.perlmonks.com on a daily basis.
Rob Kinyon <rob.kinyon@iinteractive.com>
Stevan Little <stevan.little@iinteractive.com>
Thanks to Infinity Interactive for generously donating our time.
Copyright 2004, 2005 by Infinity Interactive, Inc.
http://www.iinteractive.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Tree::Compat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tree::Compat
CPAN shell
perl -MCPAN -e shell install Tree::Compat
For more information on module installation, please visit the detailed CPAN module installation guide.