Cataly...Create(3pm)
π Cataly...Create(3pm) β the manual page, but make it cute π
okay bestie, pull up a chair, we're reading the Catalyst::Script::Create manpage together and honestly? it's giving scaffolding era. this is the little script that spins up brand new Catalyst Components for u. let's go π
β¨ NAME β¨
Catalyst::Script::Create β Create a new Catalyst Component π
πΈ SYNOPSIS πΈ
here's the whole vibe, verbatim, no cap:
myapp_create.pl [options] model|view|controller name [helper] [options]
Options:
--force don't create a .new file where a file to be created exists
--mechanize use Test::WWW::Mechanize::Catalyst for tests if available
--help display this help and exits
Examples:
myapp_create.pl controller My::Controller
myapp_create.pl controller My::Controller BindLex
myapp_create.pl --mechanize controller My::Controller
myapp_create.pl view My::View
myapp_create.pl view MyView TT
myapp_create.pl view TT TT
myapp_create.pl model My::Model
myapp_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
dbi:SQLite:/tmp/my.db
myapp_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
dbi:Pg:dbname=foo root 4321
See also:
perldoc Catalyst::Manual
perldoc Catalyst::Manual::Intro
so like, u pass it one of model, view, or controller, then a name, and optionally a helper, and optionally more options. that's the whole recipe π
the options, one by one π«Ά
--forceβ don't create a.newfile where a file to be created exists. basically: "bestie i KNOW it's there, overwrite it anyway." π₯--mechanizeβ useTest::WWW::Mechanize::Catalystfor tests, but only if it's available. conditional queen β¨--helpβ display this help and exits. classic. the "what does this even do" button π
examples that ate π
okay these are literally the ones from above but let's appreciate them:
myapp_create.pl controller My::Controllerβ make a controller, iconicmyapp_create.pl controller My::Controller BindLexβ controller + theBindLexhelpermyapp_create.pl --mechanize controller My::Controllerβ controller with mechanize testsmyapp_create.pl view My::Viewβ a view, default flavormyapp_create.pl view MyView TTβ view namedMyViewusing theTThelpermyapp_create.pl view TT TTβ yes it'sTT TT, no i will not explain, it just ismyapp_create.pl model My::Modelβ model timemyapp_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\+dbi:SQLite:/tmp/my.dbβ aDBIC::Schemamodel,create=dynamic, pointed at SQLite π¦myapp_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\+dbi:Pg:dbname=foo root 4321β same energy,create=static, Postgres this time, userroot, password4321
see also π
perldoc Catalyst::Manualperldoc Catalyst::Manual::Intro
iykyk, go read those next.
π DESCRIPTION π
Create a new Catalyst Component. periodt. β¨
here's the part u NEED to hear though: existing component files are not overwritten. if any of the component files it's about to create already exist, the file gets written with a .new suffix instead. so nothing gets clobbered behind ur back, she's polite like that π
and if u want it to stop being polite? that behavior can be suppressed with the --force option. then it's main character energy and it just goes π
ngl this is the safety net..newfiles mean u get to diff and decide.--forcemeans u already decided. choose wisely bestie π«Ά
π¦ SEE ALSO π¦
Catalyst::ScriptRunner
π AUTHORS π
Catalyst Contributors, see Catalyst.pm.
π COPYRIGHT π
This library 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 doc came from the perl v5.40.0 era, dated 2024-11-15, and it's the Cataly...Create(3pm) page from the User Contributed Perl Documentation β go forth and scaffold something slay πβ¨π
π¦ where this page comes from
- debian trixie: libcatalyst-perl 5.90132-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-perl 5.90132-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-perl 5.90132-1 Β· 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