Webservice::InterMine::Path - functions for finding problems with paths
use Webservice::InterMine::Path qw(:validate); my @errors; push @errors, validate_path($model, $path_string); push @errors, end_is_class($model, $path_string); push @errors, b_is_subclass_of_a($model, $path_stringA, $path_stringB); confess @errors if @errors;
FlyMine <support@flymine.org>
<support@flymine.org>
Please report any bugs or feature requests to support@flymine.org.
support@flymine.org
You can find documentation for this module with the perldoc command.
perldoc Webservice::InterMine::Path
You can also look for information at:
FlyMine
http://www.flymine.org
Copyright 2009,2010 FlyMine, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Usage : validate_path($model, 'Department.name'); Function: Return errors for this path, nothing if the path is valid Args : $model - the InterMine::Model to use for validating $path_string - the path in string format
Usage : last_bit($model, 'Department.name'); Function: Returns the metaclass for the last part of the path-string Args : $model - the InterMine::Model to use for validating $path_string - the path in string format
Usage : type_of($model, 'Department.name'); Function : returns a string with the type that this string evaluates to ie: Department.name => String Department.employees => Employee
Usage : end_is_class($model, 'Department.name'); Function: Returns an error if the last bit does not evaluate to a class (ie. is an attribute) Args : $model - the InterMine::Model to use for validating $path_string - the path in string format
Returns undef if $classA represents a subclass of $classB, or if they do not represent valid paths, otherwise returns a message.
Usage : class_of($instance); Function: Returns the meta-class that an object refers to. Args : an Webservice::InterMine::Field or ClassDescriptor instance
To install Webservice::InterMine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Webservice::InterMine
CPAN shell
perl -MCPAN -e shell install Webservice::InterMine
For more information on module installation, please visit the detailed CPAN module installation guide.