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

Class::Accessor::Children::Fast - Faster, child-class/accessor generation

BEFORE (WITHOUT THIS)

    package MyClass::Foo;
    use base qw( Class:Accessor::Fast );
    __PACKAGE__->mk_ro_accessors(qw( jacob michael joshua ethan ));

    package MyClass::Bar;
    use base qw( Class:Accessor::Fast );
    __PACKAGE__->mk_ro_accessors(qw( emily emma madison isabella ));

    package MyClass::Baz;
    use base qw( Class:Accessor::Fast );
    __PACKAGE__->mk_ro_accessors(qw( haruka haruto miyu yuto ));

AFTER (WITH THIS)

    package MyClass;
    use base qw( Class::Accessor::Children::Fast );
    __PACKAGE__->mk_child_ro_accessors(
        Foo => [qw( jacob michael joshua ethan )],
        Bar => [qw( emily emma madison isabella )],
        Baz => [qw( haruka haruto miyu yuto )],
    );

This module automagically generates child classes which have accessor/mutator methods.

This module inherits "Class::Accessor::Fast" to make accessors.

This module provides the following methods in addition to all methods provided by "Class::Accessor::Fast".

    MyClass->mk_child_accessors( Foo => \@fields, ... );

This generates a child class named "MyClass::Foo" which have accessor/mutator methods each named in "\@fields".

    MyClass->mk_child_ro_accessors( Bar => \@fields, ... );

This generates a child class named "MyClass::Bar" which have read-only accessors (ie. true accessors).

    MyClass->mk_child_wo_accessors( Baz => \@fields, ... );

This generates a child class named "MyClass::Baz" which have write-only accessor (ie. mutators).

Class::Accessor::Children

Class::Accessor::Fast

Yusuke Kawasaki <http://www.kawa.net/>

Copyright (c) 2007 Yusuke Kawasaki. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2007-08-16 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.