Cataly...Create(3pm)

πŸ“¦
version 5.90132 Β· 6 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 .new file where a file to be created exists. basically: "bestie i KNOW it's there, overwrite it anyway." πŸ”₯
  • --mechanize β€” use Test::WWW::Mechanize::Catalyst for 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, iconic
  • myapp_create.pl controller My::Controller BindLex β€” controller + the BindLex helper
  • myapp_create.pl --mechanize controller My::Controller β€” controller with mechanize tests
  • myapp_create.pl view My::View β€” a view, default flavor
  • myapp_create.pl view MyView TT β€” view named MyView using the TT helper
  • myapp_create.pl view TT TT β€” yes it's TT TT, no i will not explain, it just is
  • myapp_create.pl model My::Model β€” model time
  • myapp_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\ + dbi:SQLite:/tmp/my.db β€” a DBIC::Schema model, 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, user root, password 4321

see also πŸ‘€

  • perldoc Catalyst::Manual
  • perldoc 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. .new files mean u get to diff and decide. --force means u already decided. choose wisely bestie 🫢

πŸ¦‹ SEE ALSO πŸ¦‹

  • Catalyst::ScriptRunner

πŸ‘‘ AUTHORS πŸ‘‘

Catalyst Contributors, see Catalyst.pm.


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