CATALYST(1)

πŸ“¦
version 5.90132 Β· 3 versions
, in fedora 43

πŸ’– CATALYST πŸ’–

okay bestie, so this is the catalyst page from the User Contributed Perl Documentation section of the manual β€” it's the whole rundown on catalyst.pl, the little script that ✨bootstraps✨ your Catalyst app. pull up a chair, we're doing this together 🫢


🌸 NAME 🌸

catalyst β€” bootstrap a Catalyst application. that's it, that's the vibe. it sets your whole app up for you so you don't have to hand-craft a directory structure like some kind of medieval scribe πŸ’…


✨ SYNOPSIS ✨

catalyst.pl [options] application-name

so here's the tea: catalyst.pl makes a skeleton for a brand new app, and it ALSO lets you upgrade the skeleton of an app you already have. glow-up energy fr fr 🌈

here are the options, laid out exactly as they are:

  -force      don't create a .new file where a file to be created exists
  -help       display this help and exit
  -makefile   only update Makefile.PL
  -scripts    only update helper scripts

application-name has to be a valid Perl module name, and yes it can totally include :: β€” those double colons get converted into - in the project name. iconic little transformation, no cap πŸ¦‹

examples, copy them exactly bestie:

   catalyst.pl My::App
   catalyst.pl MyApp

and if you wanna upgrade your app to a new version of Catalyst:

   catalyst.pl -force -scripts MyApp

πŸŽ€ DESCRIPTION πŸŽ€

the catalyst.pl script bootstraps a Catalyst application, creating a directory structure populated with skeleton files. it's giving instant app, it's giving scaffolding, it's giving main character energy πŸ‘‘

the application name must be a valid Perl module name. the directory name it creates is formed from the application name you gave it, with double colons replaced with hyphens β€” so like, the directory for My::App is My-App. cute, right? πŸ’–

using the example application name My::App, the application directory will contain the following items:

  • README β€” a skeleton README file, which you are encouraged to expand on. do it, bestie, future you will thank you πŸ™ˆ
  • Changes β€” a changes file with an initial entry for the creation of the application. it's your app's baby book fr 🌸
  • Makefile.PL β€” Makefile.PL uses the Module::Install system for packaging and distribution of the application.
  • lib β€” contains the application module (My/App.pm) and subdirectories for model, view, and controller components (My/App/M, My/App/V, and My/App/C). the M, V, and C of it all, literally the whole MVC moment ✨
  • root β€” root directory for your web document content. this one is left empty. blank canvas, artistic choice, we respect it 🎨
  • script β€” a directory containing helper scripts:
    • myapp_create.pl β€” helper script to generate new component modules
    • myapp_server.pl β€” runs the generated application within a Catalyst test server, which can be used for testing without resorting to a full-blown web server configuration. no big setup required, we love low-effort testing πŸ’…
    • myapp_cgi.pl β€” runs the generated application as a CGI script
    • myapp_fastcgi.pl β€” runs the generated application as a FastCGI script
    • myapp_test.pl β€” runs an action of the generated application from the command line. terminal girlies rise πŸ–₯️
  • t β€” test directory. write your tests, bestie, they're not optional and we both know it 😭

the application module generated by the catalyst.pl script is functional, although it reacts to all requests by outputting a friendly welcome screen. so it works immediately, it's just very polite about it 🫢


πŸ’€ NOTE πŸ’€

neither catalyst.pl nor the generated helper script will overwrite existing files. read that again, because it matters.

in fact the scripts will generate new versions of any existing files, adding the extension .new to the filename. and the .new file is not created if it would be identical to the existing file. considerate king behavior honestly πŸ‘‘

so what does that mean for you? it means you can re-run the scripts β€” for example to see if newer versions of Catalyst or its plugins generate different code, or to see how you may have changed the generated code. (although you do of course have all your code in a version control system anyway, don't you... 😏 i'm just saying. i'm not saying anything. but i am saying.)


🌈 SEE ALSO 🌈

  • Catalyst::Manual
  • Catalyst::Manual::Intro

go read those next, bestie, they're the sequel πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

Catalyst Contributors, see Catalyst.pm. the whole collective, the group chat, the squad 🫢


This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself. free as in freedom, slay ✨


and that's the whole page!! this one shipped with perl v5.42.0, dated 2025-07-25 β€” so if you're holding a copy from some other moment in time, that's the version stamp on this one. now go bootstrap something iconic, bestie, i believe in you πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from