QBit::Base - inheritance pattern.
it's do not working with multistate_graph
https://github.com/QBitFramework/QBit-Base
cpanm QBit::Base
apt-get install libqbit-base-perl (http://perlhub.ru/)
Example:
package MyPackage::Users; use qbit; use QBit::Base qw(QBit::Application::Model::DBManager::Users); __PACKAGE_->model_fields( full_name => { label => d_gettext('Full name'), depends_on => [qw(name midname surname)], get => sub { return join(' ', grep {$_} map {$_[1]->{$_}} qw(surname name midname)); } }, phone => { label => d_gettext('Phone'), depends_on => ['extra_fields'], get => sub { $_[1]->{'extra_fields'}{'phone'}[0]; } }, ); __PACKAGE__->model_filter( db_accessor => 'db', fields => { phone => { type => 'extra_fields', field => 'id', fk_field => 'user_id', table => 'users_extra_fields' }, }, ); TRUE;
To install QBit::Base, copy and paste the appropriate command in to your terminal.
cpanm
CPAN shell
perl -MCPAN -e shell install QBit::Base
For more information on module installation, please visit the detailed CPAN module installation guide.