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
Class::Accessor::Fast::Contained(3) User Contributed Perl Documentation Class::Accessor::Fast::Contained(3)

Class::Accessor::Fast::Contained - Fast accessors with data containment

This document refers to version 1.01 of Class::Accessor::Fast::Contained

 package Foo;
 use base qw(Class::Accessor::Fast::Contained);

 # The rest is the same as Class::Accessor::Fast

This module does two things differently to the venerable Class::Accessor::Fast :
  • Fields are stored at arms-length within a single hash value of $self, rather than directly in the $self blessed referent.
  • "new()" allows mixin into an existing object, rather than creating and returning a new blessed hashref. To do this, just call something like:

     my $self = Some::Other::Class->new;
     $self = $self->Class::Accessor::Fast::Contained::new;
        

    Note that the mixin code only supports objects which use a blessed hash reference or a blessed typeglob reference.

    An alias "setup()" is available which does the same as "new()" but might make more sense if being used in this way.

Other than the standard Perl distribution, you will need the following:
Class::Accessor

If you spot a bug or are experiencing difficulties that are not explained within the documentation, please send an email to oliver@cpan.org or submit a bug to the RT system (http://rt.cpan.org/). It would help greatly if you are able to pinpoint problems or even supply a patch.

Class::Accessor

Oliver Gorwits "<oliver.gorwits@oucs.ox.ac.uk>"

Thanks to Marty Pauly and Michael G Schwern for Class::Accessor and its tests, which I've shamelessly borrowed for this distribution.

Copyright (c) The University of Oxford 2008.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2008-11-08 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.