Chapter 2.3: Project

Let project’s inherit from Genelet::Model, so you can put project-wide settings, like database type, pagination and common methods, into project’s Let component’s inherit from that of project.  So, all the components will share the same project settings.

In this example, the project is named Myproject.

package Myproject::Model;

use strict;
use Genelet::Model;

use vars qw(@ISA);
@ISA = qw(Genelet::Model);

  'sortby' => 'sortby',
  'sortreverse' => 'sortreverse',
  'field' => 'field',
  'empties' => 'empties',
  'rowcount' => 'rowcount',
  'pageno' => 'pageno',
  'totalno' => 'totalno',
  'max_pageno' => 'max_pageno',
  'total_force' => 1


So the pagination information is setup for the whole project. You can add project-wide methods here so they are available in all inherited classes.