Data::Validate::Structure - handle a structure in custom ways
use Data::Validate::Structure; my $structure = Structure->new( $data ); # Check sub structures matches exactly $structure == $structure2 # Check sub structures matches equaly (array order not important) $structure eq $structure # Check structure contains all of structure2 at least $structure >= $structure2 # Check structure2 contains all of structure at least $structure <= $structure2 # structure much contain structure2 but not equal it $structure > $structure2 # structure2 must contain structure but not equal it $structure < $structure2 # Make sure structure does not exactly match structure2 $structure != $structure2 # Remove all parts of structure2 from structure $structure - $structure2 $structure -= $structure2 # Merge two structures together $structure + $structure2 $structure += $structure2
Take a structure and attempt to allow some basic structure to structure testing.
Create a new structure.
Internal method, wht to do when a function is disabled.
Test that structure is the same as other structure.
Test that structure is not the same as other structure.
Internal method for testing structural equiverlance.
Return true if structure is identical.
Return true if structure is not identical.
Return true if structure is identical (internal).
Return true if the caller was internal.
Return the structure
Return the structure name
Returns the truth of the structure
Return the structure directly
Return the name directly
Return true if other structure is equle.
Return true if other hash is equle.
Return true if other array is equle.
Return the current structure plus another structure
Append another structure.
Internal method for merging two structures.
Internal method for returning two structures.
Return the current hash plus another hash
Return the current array plus another array
Deal with conflicting scalar data (atm we ignore)
Return the current structure minus a sub structure
Remove a sub structure from the current structure.
Remove array elements using structure (NOT FINISHED).
Return the current hash minus a sub hash
Remove a scalar so long as it's eq
Get the structure reference and the object.
Make a clone of a structure.
Make a structure object clone.
Sort out each request so that it goes to the right place and so that the comparisons are fair.
Copyright, Martin Owens 2005-2008, Affero General Public License (AGPL) http://www.fsf.org/licensing/licenses/agpl-3.0.html