Cataly...ptRole(3pm)
π Catalyst::ScriptRole π
ok so bestie, welcome to Cataly...ptRole(3pm) β yes the man page header is doing that truncation thing, it's giving "my name got cut off in the group chat preview" but we move. The real name is Catalyst::ScriptRole and it lives in the User Contributed Perl Documentation section (section 3pm, for the perl girlies keeping track) π
β¨ NAME β¨
Catalyst::ScriptRole β Common functionality for Catalyst scripts.
Like, the shared vibe that every Catalyst script inherits so nobody has to write the same stuff forty times. Periodt. π
πΈ SYNOPSIS πΈ
package MyApp::Script::Foo;
use Moose;
use namespace::autoclean;
with 'Catalyst::ScriptRole';
sub _application_args { ... }
see how you just with it? consumed, slayed, done. π¦
π DESCRIPTION π
Role with the common functionality of Catalyst scripts.
That's it, that's the whole thing β it's a Moose role, so you compose it into your script class and boom, all the shared machinery is just there. no cap. β¨
π₯ METHODS π₯
run
The method invoked to run the application.
Like literally, this is the main character method. it gets called, and the app runs. that's the moment. π
print_usage_text
Prints out the usage text for the script you tried to invoke.
so if someone runs your script wrong, this is what politely tells them how it actually works. helpful icon behavior fr fr π«Ά
π ATTRIBUTES π
application_name
The name of the application class, e.g. MyApp
yep, just the name. MyApp, not the whole path, not the file, just the class name bestie π
π SEE ALSO π
CatalystMooseX::Getopt
go read those too, they're part of the lore π§
π AUTHORS π
Catalyst Contributors, see Catalyst.pm
(that's the whole credits section, they're keeping it lowkey π)
π COPYRIGHT π
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
so yeah β free software, same terms as Perl itself, go wild but respectfully πΈ
ok and the cute lil sign-off: this whole thing is from perl v5.40.0, dated 2024-11-15, and the manual it came from is Cataly...ptRole(3pm) β which is just Catalyst::ScriptRole(3pm) with a tragic haircut. mwah, go write some scripts π
β¨π¦
π¦ 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