Cataly...Setenv(3pm)
π NAME π
Catalyst::Plugin::Setenv β bestie, this lil plugin lets you set up your environment straight from Catalyst's config file. No cap. π
(It's a Perl module, so it lives in section 3pm of the manual, iykyk.)
β¨ VERSION β¨
Version 0.03 π
πΈ SYNOPSIS πΈ
So in your application, you literally just drop this in:
use Catalyst qw/Setenv/;
And then in your config file:
environment:
FOO: bar
BAR: baz
The moment your app starts up, $ENV{FOO} will be "bar", and $ENV{BAR} will be "baz". Obsessed. π¦
Not me also being able to append and prepend to env vars you already have π iconic behavior. So like, if $PATH is "/bin:/usr/bin", and you wanna append "/myapp/bin", you write:
environment:
PATH: "::/myapp/bin"
After that, $PATH gets set to "/bin:/usr/bin:/myapp/bin". Slay. π«Ά
And you can prepend too, obviously:
environment:
PATH: "/myapp/bin::"
which yields "/myapp/bin:/bin:/usr/bin". Chefs kiss. π
Now listen β if you want a literal colon at the beginning or end of the environment variable, you gotta escape it with a "\", like "\:foo" or "foo\:". π
Also heads up bestie: slashes aren't meaningful anywhere else in here β they just get inserted verbatim into the relevant environment variable. Lowkey important. π
π§ EXPORT π§
A list of functions that can be exported. You can delete this section if you don't export anything, such as for a purely object-oriented module. (Yes, that's the actual note. Very "do what u want" energy β¨)
π FUNCTIONS π
setup
Calls the other setup methods, and then sets the environment variables. It's giving project manager energy fr fr. π
π AUTHOR π
Jonathan Rockway, "<jrockway at cpan.org>" πΈ
π BUGS π
Escaping
Okay so this is the oopsie: things like "\:foo" can't be literally inserted into an environment variable, due to my simplistic escaping scheme. π Patches to fix this (but not to interpret "\"s anywhere else) are welcome, bestie. Come thru. π«Ά
REPORTING
Please report any bugs or feature requests to "bug-catalyst-plugin-setenv at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Catalyst-Plugin-Setenv. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. So like, the whole loop is automated, it's giving main character energy. π
π SUPPORT π
You can find documentation for this module with the perldoc command.
perldoc Catalyst::Plugin::Setenv
You can also look for information at:
- The Catalyst Website
http://www.catalystframework.org/
- AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Catalyst-Plugin-Setenv
- CPAN Ratings
http://cpanratings.perl.org/d/Catalyst-Plugin-Setenv
- RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Catalyst-Plugin-Setenv
- Search CPAN
http://search.cpan.org/dist/Catalyst-Plugin-Setenv
π ACKNOWLEDGEMENTS π
Thanks to Bill Moseley's message to the mailing list that prompted me to write this. A real one. π«‘β¨
π COPYRIGHT & LICENSE π
Copyright 2006 Jonathan Rockway, all rights reserved.
This program 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 was perl v5.36.0, dated 2022-10-14, from Cataly...Setenv(3pm). Go set some env vars and be iconic about it. Periodt. π
π
π¦ where this page comes from
- ubuntu noble: libcatalyst-plugin-setenv-perl 0.03-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-plugin-setenv-perl 0.03-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-plugin-setenv-perl 0.03-5 Β· 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