Object-InsideOut version 1.04.00 ================================ This module provides comprehensive support for implementing classes using the inside-out object model. This module implements inside-out objects as anonymous scalar references that are blessed into a class with the scalar containing the ID for the object (usually a sequence number). Object data (i.e., fields) are stored within the class's package in either arrays indexed by the object's ID, or hashes keyed to the object's ID. The virtues of the inside-out object model over the 'blessed hash' object model have been extolled in detail elsewhere. Briefly, inside-out objects offer the following advantages over 'blessed hash' objects: = Encapsulation Object data is enclosed within the class's code and is accessible only through the class-defined interface. = Field Name Collision Avoidance Inheritance using 'blessed hash' classes can lead to conflicts if any classes use the same name for a field (i.e., hash key). Inside-out objects are immune to this problem because object data is stored inside each class's package, and not in the object itself. = Compile-time Name Checking A common error with 'blessed hash' classes is the misspelling of field names: $obj->{'coment'} = 'No comment'; # Should be 'comment' not 'coment' As there is no compile-time checking on hash keys, such errors do not usually manifest themselves until runtime. With inside-out objects, data is accessed using methods, the names of which are checked by the Perl compiler such that any typos are easily caught using "perl -c". This module offers all the capabilities of Class::Std with the following additional key advantages: = Speed When using arrays for storing object data, Object::InsideOut objects are as much as 40% faster than 'blessed hash' objects for fetching and setting data, and even with hashes they are still several percent faster than 'blessed hash' objects. For the same types of operations, Object::InsideOut objects are from 2 to 6 times faster than Class::Std objects. = Threads Object::InsideOut is thread safe, and thoroughly supports sharing objects between threads using threads::shared. Class::Std is not usable in threaded applications (or applications that use 'fork' under ActiverPerl). = Flexibility Allows control over object ID specification, accessor naming, parameter name matching, and more. = mod_perl and Runtime Loading Usable from within mod_perl, and supports classes that may be loaded at runtime (i.e., using "eval { require ...; };"). = Perl 5.6 Usable with Perl 5.6.0 and later. Class::Std is only usable with Perl 5.8.1 and later. = Exception Objects As recommended in "Perl Best Practices", Object::InsideOut uses Exception::Class for handling errors in an OO-compatible manner. = Object Serialization Object::InsideOut has built-in support for object dumping and reloading that can be accomplished in either an automated fashion or through the use of class-supplied subroutines. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install or if you have Module::Build installed: perl Build.PL perl Build perl Build test perl Build install DEPENDENCIES Requires Perl 5.6.0 or later. This module uses the following 'standard' modules: ExtUtils::MakeMaker - For installation Test::More (0.50 or later) - For installation Scalar::Util (1.10 or later) - Standard in 5.8 or obtain from CPAN This module requires the following module available from CPAN: Exception::Class (1.22 or later) COPYRIGHT AND LICENCE Copyright 2005 Jerry D. Hedden This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. # EOF