GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  BIO::PHYLO::UTIL::CONSTANT (3)

.ds Aq ’

NAME

Bio::Phylo::Util::CONSTANT - Global constants and utility functions

CONTENTS

DESCRIPTION

This package defines globals used in the Bio::Phylo libraries. The constants are called internally by the other packages, they have no direct usage. In addition, several useful subroutines are optionally exported, which are described below.

SUBROUTINES

The following subroutines are utility functions that can be imported using:



 use Bio::Phylo::Util::CONSTANT :functions;



The subroutines use prototypes for more concise syntax, e.g.:



 looks_like_number $num;
 looks_like_object $obj, $const;
 looks_like_hash @_;
 looks_like_class $class;



These subroutines are used for argument processing inside method calls.
looks_like_instance() Tests if argument 1 looks like an instance of argument 2



 Type    : Utility function
 Title   : looks_like_instance
 Usage   : do something if looks_like_instance $var, $class;
 Function: Tests whether $var looks like an instance of $class.
 Returns : TRUE or undef
 Args    : $var = a variable to test, a $class to test against.
           $class can also be anything returned by ref($var), e.g.
           HASH, CODE, etc.



looks_like_implementor() Tests if argument 1 implements argument 2



 Type    : Utility function
 Title   : looks_like_implementor
 Usage   : do something if looks_like_implementor $var, $method;
 Function: Tests whether $var implements $method
 Returns : return value of UNIVERSAL::can or undef
 Args    : $var = a variable to test, a $method to test against.



looks_like_number() Tests if argument looks like a number.



 Type    : Utility function
 Title   : looks_like_number
 Usage   : do something if looks_like_number $var;
 Function: Tests whether $var looks like a number.
 Returns : TRUE or undef
 Args    : $var = a variable to test



looks_like_object() Tests if argument looks like an object of specified type constant.



 Type    : Utility function
 Title   : looks_like_object
 Usage   : do something if looks_like_object $obj, $const;
 Function: Tests whether $obj looks like an object.
 Returns : TRUE or throws ObjectMismatch
 Args    : $obj   = an object to test
                   $const = a constant as defined in this package



looks_like_hash() Tests if argument looks like a hash.



 Type    : Utility function
 Title   : looks_like_hash
 Usage   : do something if looks_like_hash @_;
 Function: Tests whether argument looks like a hash.
 Returns : hash (same order as arg) or throws OddHash
 Args    : An array of hopefully even key/value pairs



looks_like_class() Tests if argument looks like a loadable class name.



 Type    : Utility function
 Title   : looks_like_class
 Usage   : do something if looks_like_class $class;
 Function: Tests whether argument looks like a class.
 Returns : $class or throws ExtensionError
 Args    : A hopefully loadable class name



SEE ALSO

There is a mailing list at <https://groups.google.com/forum/#!forum/bio-phylo> for any user or developer questions and discussions.
Bio::Phylo::Manual Also see the manual: Bio::Phylo::Manual and <http://rutgervos.blogspot.com>.

CITATION

If you use Bio::Phylo in published research, please cite it:

<B>Rutger A VosB>, <B>Jason CaravasB>, <B>Klaas HartmannB>, <B>Mark A JensenB> and <B>Chase MillerB>, 2011. Bio::Phylo - phyloinformatic analysis using Perl. BMC Bioinformatics <B>12B>:63. <http://dx.doi.org/10.1186/1471-2105-12-63>

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 BIO::PHYLO::UTIL::CONSTANT (3) 2014-02-08

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.