CRUD(3pm)
π NAME π
Catalyst::Model::CDBI::CRUD β the CRUD CDBI Model Class, bestie!! It's from the User Contributed Perl Documentation corner of the manual-verse, and honestly? Iconic little relic energy. π«Ά
β¨ SYNOPSIS β¨
okay so here's the whole vibe, copy-paste ready, no cap:
# lib/MyApp/Model/CDBI.pm
package MyApp::Model::CDBI;
use base 'Catalyst::Model::CDBI::CRUD';
__PACKAGE__->config(
dsn => 'dbi:SQLite2:/tmp/myapp.db',
relationships => 1
);
1;
# lib/MyApp.pm
package MyApp;
use Catalyst 'FormValidator';
__PACKAGE__->config(
name => 'My Application',
root => '/home/joeuser/myapp/root'
);
sub table : Global {
my ( $self, $c ) = @_;
$c->form( optional => [ MyApp::Model::CDBI::Table->columns
] ); #see Data::FormValidator
$c->forward('MyApp::Model::CDBI::Table');
}
sub end : Private {
$c->forward('MyApp::V::TT');
}
1;
πΈ DESCRIPTION πΈ
So Catalyst::Model::CDBI::CRUD is a subclass of Catalyst::Model::CDBI that comes with extra CRUD methods bolted on top. π
And like, don't forget to copy the base templates over to config->root!! That part is not optional, she will simply not render without them. π
NOTE: bestie. This module has been deprecated. π Go read the BUGS section down below, it's giving cautionary tale.
π METHODS π
add
Literally does nothing by default. She's just standing there. π
destroy
Deletes a Class::DBI object. Gone. Poof. β¨
do_add
Creates a brand new Class::DBI object, sourced from $c->form.
do_edit
Updates a Class::DBI object, sourced from $c->form.
edit
Does nothing by default. Main character energy: present, but not participating. π
list
Does nothing by default.
process
Dispatches CRUD requests to the methods. This is the one actually doing the work fr fr. π₯
view
Does nothing by default.
π BUGS π
Not me having to tell you this, but: this module is no longer supported by the Catalyst developers. π They keep it indexed purely for the sake of existing users, but they highly recommend that new users go look at Catalyst::Helper::Controller::Scaffold instead. Periodt.
π¦ SEE ALSO π¦
CatalystCatalyst::Model::CDBI
π AUTHOR π
Sebastian Riedel, sri@cpan.org π
π COPYRIGHT π
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. π
okay that's the whole page bestie, tysm for reading, mwah!! π This lil time capsule is perl v5.34.0, dated 2022-06-09, filed under CRUD(3pm) β stay slay, hydrate, and go use the Scaffold controller instead. β¨ππ«Ά
π¦ where this page comes from
- debian bookworm: libcatalyst-model-cdbi-crud-perl 0.04-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-model-cdbi-crud-perl 0.04-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-model-cdbi-crud-perl 0.04-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-model-cdbi-crud-perl 0.04-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-model-cdbi-crud-perl 0.04-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms