ClearPress::model - a base class for the data-model of the ClearPress MVC family
$LastChangedRevision: 12 $
use strict; use warning; use base qw(ClearPress::model); __PACKAGE__->mk_accessors(__PACKAGE__->fields()); sub fields { return qw(...); }
my @aFields = $oSelf->fields(); my @aFields = __PACKAGE__->fields();
my $sPrimaryKey = $oSelf->fields();
my $sTableName = $oSelf->table();
my $oInstance = ClearPress::model::subclass->new();
my $oUtil = ClearPress::model::subclass->util(); my $oUtil = $oInstance->util();
Invokes $self->read() if necessary. my $sFieldValue = $oSelf->get($sFieldName);
my $arObjects = $oInstance->gen_getarray('ClearPress::model::subclass', q(SELECT a,b,c FROM x,y WHERE x.d=? AND y.e=?), @bind_params);
my $arObjects = $self->gen_getall(); my $arObjects = $self->gen_getall('ClearPress::otherclass');
my $oObj = $self->gen_getobj('application::model::name');
$oSelf->create();
$oSelf->load();
$oSelf->update();
$oSelf->delete();
$oSelf->save();
Class::Accessor ClearPress::util English Carp
Roger Pettett, <rpettett@cpan.org>
Copyright (C) 2007 Roger Pettett
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.
To install ClearPress, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ClearPress
CPAN shell
perl -MCPAN -e shell install ClearPress
For more information on module installation, please visit the detailed CPAN module installation guide.