CGI::Ap...:Module(3)
π NAME π
okay bestie, so this is the Template Controller base class for CGI::Application::Structured apps β and yeah, the man page it lives on is literally called CGI::Ap...:Module(3) (yes the name is truncated like that, it's giving mystery, we love her anyway π«Ά). It's filed under User Contributed Perl Documentation and honestly? iconic of her.
β¨ SYNOPSIS β¨
A controller module for <tmpl_var main_module>.
Imports DBIx::Class schema here for all subclasses generated by script/create_controller.pl
like. that's the whole vibe. one controller module, one <tmpl_var main_module> placeholder, one DBIx::Class schema getting imported up top for every subclass that script/create_controller.pl spits out. slay π
π¦ DESCRIPTION π¦
So this module is the base class for Controllers in this app. main character energy, obviously β everyone else inherits from her.
Your actual subclasses? They live in the <tmpl_var module>::C package. that's the neighborhood. that's where the girls hang out πΈ
π METHODS π
π SUBCLASSED METHODS π
error
This error page is lowkey fine for development, but no cap β you're gonna want to customize this runmode for your actual application. it's giving starter-template chic, not production-ready lewk π
cgiapp_init
This one initializes the Controller base class for the app, configures the DBIx::Class plugin, sets an error mode, and configures the TT template directory. that's a lot of jobs for one method and she does them all, periodt π
Pro tip from the ancestors: use 'setup' in your subclasses to further configure each individual Controller subclass. and the order matters, bestie β 'setup' is called after 'cgiapp_init'. don't fight it, just respect the sequence π«Ά
TODO: change all these values to ones more appropriate for your application. fr fr, these are placeholders and they know it π
TODO: Other methods in your public interface go here. (yes the original literally leaves you a little parking spot for them, we stan a self-aware template β¨)
π BUGS AND LIMITATIONS π
There are, and I quote the universe on this one, no known problems with this module. she's flawless, she's never done anything wrong in her life, not once π
But IF something goes sideways (not that she would, but hypothetically), please report any bugs or feature requests at rt.cpan.org.
And here's the cute part: I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. it's a whole group chat, just for your bug. you're never alone in there π«Ά
π₯ SEE ALSO π₯
CGI::Applicationβ the mothership, the blueprint, the blueprint's blueprint. go read her too iykyk π
πΈ THANKS πΈ
List acknowledgements here or delete this section. (yes, that's the actual instruction, it's literally asking you to either say thank you or burn the section to the ground, and honestly? valid π)
π AUTHOR π
<tmpl_var author>
that's the author placeholder, bestie. whoever fills it in gets the crown π«Ά
π LICENSE AND COPYRIGHT π
Copyright <tmpl_var year> <tmpl_var author>, all rights reserved.
<tmpl_var license_blurb>
okay and that's the whole page, we're done here!! π cute little sign-off for you: this was perl v5.42.0, dated 2025-07-25, and yes she's still serving the same truncated CGI::Ap...:Module(3) energy she started with. no notes. iconic. bye bestie πβ¨
π¦ where this page comes from
- fedora 43: perl-CGI-Application-Structured-Tools 0.015-38.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-CGI-Application-Structured-Tools 0.015-38.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms