Data::Classifier::Result
NOTE: You should have already read the documentation for Data::Classifier which has an example on how to produce Data::Classifier::Result instances.
This class represents results from classification requests sent to a Data::Classifier instance.
Returns the most specific class that matched as a hash; this includes all of the attributes stored in a node. If no classification could be done, this returns undef.
Returns a list of the entire class hierarchy for the result. The root node is at 0 and the most specific node is at the end.
Returns a string that is the name of the most specific class that matched.
Returns a string of the entire class path name for the match, seperated by double colons. For instance: Root::BMW::Sports
Returns a list of the specified attributes for all the nodes in the matching class hierarchy. The root node is at 0 and the most specific node is at the end. If a node has no attribute by this name, undef will be stored in the list at its corresponding position.
This class is designed to be subclassed and be used in conjuction with other classes that extended the functionality of Data::Classifier.
The following methods are designed to be overloaded to change behavior:
This method will be called as the last step in the constructor, prior to actually returning the new instance. If you need to do any kind of initialization in your subclass, this would be the place to do it.
This class could probably use a method that searches through the tree, like the look_down method on HTML::Element
This is a class used by Data::Classifier - see the documentation for that class for information on authors and bugs and for more documentation.
To install Data::Classifier, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Classifier
CPAN shell
perl -MCPAN -e shell install Data::Classifier
For more information on module installation, please visit the detailed CPAN module installation guide.