Cataly...Setenv(3pm)

πŸ“¦
version 0.03 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– 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 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