NAME
Class::Util - Class utility functions
VERSION 2.0
Included in OOTools 2.0 distribution.
The latest versions changes are reported in the Changes file in this distribution.
The distribution includes:
Class::constr
Pragma to implement constructor methods
Class::props
Pragma to implement lvalue accessors with options
Class::groups
Pragma to implement groups of properties accessors with options
Class::Error
Delayed checking of object failure
Object::props
Pragma to implement lvalue accessors with options
Object::groups
Pragma to implement groups of properties accessors with options
Class::Util
Class utility functions
INSTALLATION
- Prerequisites
-
Perl version >= 5.6.1
- CPAN
-
perl -MCPAN -e 'install OOTools'
- Standard installation
-
From the directory where this file is located, type:
perl Makefile.PL make make test make install
SYNOPSIS
use Class::Util qw(load);
# will require 'Any::Module' from a variable
$module = 'Any::Module';
load $module;
$_ = 'Any::Module'
load;
DESCRIPTION
This is a micro-weight module that (right now) exports only a functions of general utility in Class operations.
FUNCTIONS
load [ any_class ]
This function will require the any_class and will croak on error. If no argument is passed it will use $_ as the argument. It is aware of the classes that have been loaded or declared in other loaded files, so it doesn't croak if the symbol table of the class is already defined, anyway you can check that by checking $@
.
It is useful if you need to load any module from a variable, since it avoids you to do:
eval "require $class";
if ( $@ ) { check_what_error and croak $@ };
SUPPORT
If you need support or if you want just to send me some feedback or request, please use this link: http://perl.4pro.net/?Class::Util.
AUTHOR and COPYRIGHT
© 2004-2005 by Domizio Demichelis.
All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as perl itself.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 67:
Expected '=item *'
- Around line 129:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252