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
Package::groups(3) User Contributed Perl Documentation Package::groups(3)

Object::groups - Pragma to implement group of properties

Included in OOTools 2.21 distribution.

The latest versions changes are reported in the Changes file in this distribution.

The distribution includes:

Package::props
Pragma to implement lvalue accessors with options
* Package::groups
Pragma to implement groups of properties accessors with options
* 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
* Class::Util
Class utility functions
* Object::props
Pragma to implement lvalue accessors with options
* Object::groups
Pragma to implement groups of properties accessors with options

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
    

This pragma is very similar to the "Class::groups" pragma: the main difference is the underlying variable that holds the value, which is a global hash in the caller package instead in the class. For example:

   package BaseClass;
   use Package::groups 'a_package_group';
   use Class::groups 'a_class_group';
   
   package SubClass;
   our @ISA = 'BaseClass';
   
   # underlaying hash for accessor 'a_package_group' is
   # %BaseClass::a_package_group
   # underlaying hash for accessor 'a_class_group' is
   # %SubClass::a_class_group;

This might seem a subtle difference, but the possible usage in inherited classes makes a big difference.

While you can also call a package group accessor by statically using the implementing package name (e.g. "BaseClass-"a_group>), regardless the subclass that uses it, overridden package accessor groups don't inherit defaults as Class accessors do.

See the documentation of the accessor groups in Class::groups for all the details.

If you need support or if you want just to send me some feedback or request, please use this link: http://perl.4pro.net/?Object::groups.

© 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.

Thanks to Juerd Waalboer (http://search.cpan.org/author/JUERD) that with its Attribute::Property inspired the creation of this distribution.

Hey! The above document had some coding errors, which are explained below:
Around line 33:
Expected text after =item, not a bullet
Around line 37:
Expected text after =item, not a bullet
Around line 41:
Expected text after =item, not a bullet
Around line 45:
Expected text after =item, not a bullet
Around line 49:
Expected text after =item, not a bullet
Around line 53:
Expected text after =item, not a bullet
Around line 57:
Expected text after =item, not a bullet
Around line 61:
Expected text after =item, not a bullet
Around line 118:
Non-ASCII character seen before =encoding in '©'. Assuming CP1252
2017-04-19 perl v5.32.1

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

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