Chapter 2.4: Component

Components should inherit from the project. In this example, the component is named Mycomponent:

package Myproject::Mycomponent::Model;

use strict;
use Myproject::Model;
use vars qw(@ISA);

@ISA=('Myproject::Model');

__PACKAGE__->setup_accessors(
  current_table  => string,
  current_key    => string,
  current_id_auto=> string,
  current_insupd => string,

  insert_pars    => array_ref,
  topics_pars    => array_ref,
  edit_pars      => array_ref,
  update_pars    => array_ref,
  empty_pars     => array_ref,
  key_in         => hash
);

1;

The RESTful verbs topics, edit, insert, update, insupd and delete are now ready to use.

You can add new method or override an existing RESTful verb following Section 2.2.