QBit::Class - base class for QBit framework.
All classes must inherit QBit::Class.
Arguments:
%fields - fields to store in object.
Return value: blessed object.
No arguments.
Method called from "new" before return object.
@fields - array of strings, names of accessors.
It generate read/write accessors.
__PACKAGE__->mk_accessors(qw(fieldname fieldname2)); .... $self->fieldname(); # return value $self->fieldname('newval'); # set value
It generate only read accessors.
__PACKAGE__->mk_accessors(qw(fieldname fieldname2)); .... $self->fieldname(); # return value
@metods - array of strings, names of abstract methods.
__PACKAGE__->abstract_methods(qw(method1 method2)); .... $self->method1(); # trow exception with text "Abstract method: method1" if descendant has not override it.
To install QBit::Class, copy and paste the appropriate command in to your terminal.
cpanm
cpanm QBit::Class
CPAN shell
perl -MCPAN -e shell install QBit::Class
For more information on module installation, please visit the detailed CPAN module installation guide.