|
NAMEClass::Data::Lite - a minimalistic class accessors SYNOPSIS package MyPackage;
use Class::Data::Lite (
rw => {
readwrite => 'rw',
},
ro => {
readonly => 'ro',
},
);
package main;
print(MyPackage->readwrite); #=> rw
DESCRIPTIONClass::Data::Lite is a minimalistic implement for class accessors. There is no inheritance and fast. THE USE STATEMENTThe use statement (i.e. the "import" function) of the module takes a single hash as an argument that specifies the types and the names of the properties. Recognises the following keys.
BENCHMARKIt is faster than Class::Data::Inheritance. See "eg/bench.pl". Rate Class::Data::Inheritable Class::Data::Lite
Class::Data::Inheritable 2619253/s -- -38%
Class::Data::Lite 4191169/s 60% --
SEE ALSOClass::Accessor::Lite, Class::Data::Inheritance LICENSECopyright (C) Songmu. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHORSongmu <y.songmu@gmail.com>
|