NAME Dpchrist::Is - various type tests DESCRIPTION This documentation describes module revision $Revision: 1.25 $. This is alpha test level software and may change or disappear at any time. SUBROUTINES _isa($$) if (_isa EXPR1,EXPR2) { # do something... } Returns true (1) if EXPR1 is an object or class of type EXPR2, or derived from EXPR2. Otherwise, returns the undefined value. This subroutine should not generate exceptions. is_arrayref($) if (is_arrayref EXPR) { # do something... } Returns true (1) if EXPR is an array reference, including an empty array. Otherwise, returns the undefined value. This subroutine should not generate exceptions. is_filehandle($) if (is_filehandle EXPR) { # do something... } Returns true (1) if EXPR is a file handle. Otherwise, returns the undefined value. This subroutine should not generate exceptions. is_filename($) if (is_filename EXPR) { # do something... } Returns true (1) if EXPR is the name of an existing file or if Perl can open a file for writing on that name (opens, closes, and unlinks file to find out). Otherwise, returns the undefined value. This subroutine should not generate exceptions. is_hashref($) if (is_hashref EXPR) { # do something... } Returns true (1) if EXPR is a hash reference, including an empty hash. Otherwise, returns the undefined value. This subroutine should not generate exceptions. is_nonempty_string($) if (is_nonempty_string EXPR) { # do something... } Returns true (1) if EXPR is a non-empty string. Otherwise, returns the undefined value. This subroutine should not generate exceptions. is_rxref($) if (is_rxref EXPR) { # do something... } Returns true (1) if EXPR is a reference to a regular expression, including an empty regular expression. Otherwise, returns the undefined value. This subroutine should not generate exceptions. is_string($) if (is_string EXPR) { # do something... } Returns true (1) if EXPR is a string, including an empty string. Otherwise, returns the undefined value. This subroutine should not generate exceptions. is_wholenumber($) if (is_wholenumber EXPR) { # do something... } Returns true (1) if EXPR is a whole number. Otherwise, returns the undefined value. This subroutine should not generate exceptions. isa_class($$) if (isa_class EXPR1,EXPR2) { # do something... } Returns true (1) if EXPR1 is a class of type EXPR2, or derived from EXPR2. Otherwise, returns the undefined value. This subroutine should not generate exceptions. isa_object($$) if (isa_object EXPR1,EXPR2) { # do something... } Returns true (1) if EXPR1 is an object of type EXPR2, or derived from EXPR2. Otherwise, returns the undefined value. This subroutine should not generate exceptions. EXPORTS This module exports nothing by default. All subroutines except those starting with an underscore '_' may be exported by using the ':all' tag: use Dpchrist::Is qw( :all ); Specific subroutines may be exported on request. See 'perldoc Exporter' for details. INSTALLATION Old school: perl Makefile.PL make make test make install Minimal: cpan Dpchrist::Is Complete: cpan Bundle::Dpchrist DEPENDENCIES See Makefile.PL in source distribution root directory. SEE ALSO Scalar::Util AUTHOR David Paul Christensen dpchrist@holgerdanske.com COPYRIGHT AND LICENSE Copyright 2010 by David Paul Christensen dpchrist@holgerdanske.com This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.