Cataly...l::CDBI(3pm)

πŸ’– Cataly...l::CDBI β€” the manual, but make it make sense πŸ’–

okay bestie, you found Cataly...l::CDBI(3pm), which is the User Contributed Perl Documentation page for this thing. yes the title is literally truncated like that in the header, that's just how man pages do. let's go ✨


🌸 NAME 🌸

Catalyst::Model::CDBI β€” [DEPRECATED] the CDBI Model Class, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

first up, the helper does the heavy lifting:

# use the helper
create model CDBI CDBI dsn user password

then your model file is giving very much:

# lib/MyApp/Model/CDBI.pm
package MyApp::Model::CDBI;

use base 'Catalyst::Model::CDBI';

__PACKAGE__->config(
    dsn           => 'dbi:Pg:dbname=myapp',
    password      => '',
    user          => 'postgres',
    options       => { AutoCommit => 1 },
    relationships => 1
);

1;

and you can call it as an object method:

# As object method
$c->comp('MyApp::Model::CDBI::Table')->search(...);

or as a class method, whichever vibe you're on today:

# As class method
MyApp::Model::CDBI::Table->search(...);

✨ DESCRIPTION ✨

so this is the Class::DBI model class. it's built on top of Class::DBI::Loader, okay? and Class::DBI is generally not what you reach for on new applications β€” DBIx::Class is the preferred one instead. so like, this model is deprecated and (mostly) unmaintained. it's giving retirement era πŸ™ˆ

it's kept here purely for older applications that still need it for backwards compatibility. if that's not you, respectfully, use something else πŸ’…

πŸŽ€ new πŸŽ€

initializes Class::DBI::Loader and loads classes using the class config. also attempts to borg all the classes. yes, borg. we don't make the rules 🫢


πŸ”₯ SEE ALSO πŸ”₯

  • Catalyst
  • Class::DBI Class::DBI::Loader

πŸ‘‘ AUTHOR πŸ‘‘

Sebastian Riedel, sri@cpan.org


🌈 CONTRIBUTORS 🌈

  • mst: Matt S Trout mst@shadowcat.co.uk
  • Arathorn: Matthew Hodgson matthew@arasphere.net

Copyright (c) 2005 - 2010 the Catalyst::Model::CDBI AUTHOR and CONTRIBUTORS as listed above.

This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.


and that's the whole page, bestie πŸ’– this was perl v5.32.0, dated 2021-01-05, straight from Cataly...l::CDBI(3pm). mwah, go forth and maintain your legacy app πŸŽ€βœ¨

πŸ“¦ where this page comes from