GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Maypole::Model::CDBI::DFV(3) User Contributed Perl Documentation Maypole::Model::CDBI::DFV(3)

Maypole::Model::CDBI::DFV - Class::DBI::DFV model for Maypole.

    package Foo;
    use 'Maypole::Application';

    Foo->config->model("Maypole::Model::CDBI::DFV");
    Foo->setup([qw/ Foo::SomeTable Foo::Other::Table /]);

    # Look ma, no untainting

    sub Foo::SomeTable::SomeAction : Exported {

        . . .

    }

This module allows you to use Maypole with previously set-up Class::DBI classes that use Class::DBI::DFV;

Simply call "setup" with a list reference of the classes you're going to use, and Maypole will work out the tables and set up the inheritance relationships as normal.

Better still, it will also set use your DFV profile to validate input instead of CGI::Untaint. For teh win!!

  This method is inherited from Maypole::Model::Base and calls setup_database,
  which uses Class::DBI::Loader to create and load Class::DBI classes from
  the given database schema.

  This method loads the model classes for the application

  returns class for given table

This class method is passed the name of a model class that represensts a table and allows the master model class to do any set-up required.

  Checks parameters against the DFV profile for the class, returns the results
  of DFV's check.

  my $dfv_results = __PACKAGE__->check_params($r->params);

Action methods are methods that are accessed through web (or other public) interface.

Inherited from Maypole::Model::CDBI::Base except do_edit (below)

If there is an object in "$r->objects", then it should be edited with the parameters in "$r->params"; otherwise, a new object should be created with those parameters, and put back into "$r->objects". The template should be changed to "view", or "edit" if there were any errors. A hash of errors will be passed to the template.

Inherited from Maypole::Model::CDBI::Base.

This action deletes records

Inherited from Maypole::Model::CDBI::Base.

This action method searches for database records.

Inherited from Maypole::Model::CDBI::Base.

The "list" method fills "$r->objects" with all of the objects in the class. The results are paged using a pager.

Maypole::Model::Base

Maypole::Model::CDBI::Base

Aaron Trevena.

You may distribute this code under the same terms as Perl itself.
2007-05-18 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.