-
-
06 Jul 2022 22:09:10 UTC
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues (0)
- Testers (16 / 0 / 0)
- Kwalitee
Bus factor: 1- 92.31% Coverage
- License: gpl_3
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (63.8KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
++ed by:1 non-PAUSE user- Dependencies
- Capture::Tiny
- Carp
- Digest
- File::Basename
- File::Spec::Functions
- File::Which
- Getopt::Long
- IPC::System::Simple
- JSON::PP
- Module::Find
- Params::Validate
- Pod::Usage
- Scalar::Util
- Shell::Config::Generate
- Shell::GetEnv
- Shell::Guess
- Storable
- constant
- overload
- strict
- warnings
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Changes for version 1.00 - 2022-07-06
- API BREAKAGE
- Documentation of how the APP_ENV_SITE environment variable interacted with the Site parameter was incomplete and incorrect.
- The Site parameter was used to *add* to the list of modules to try, not to replace what was specified via $ENV{APP_ENV_SITE}. So, if
- $ENV{APP_ENV_SITE} = 'Site1';
- and Site => 'Site2', then loading the MyApp environment would scan for the first of
- App::Env::Site1::MyApp; App::Env::Site2::MyApp; App::Env::MyApp;
- rather than the expected
- App::Env::Site2::MyApp; App::Env::MyApp;
- App::Env::Site was loaded when App::Env is loaded if $ENV{APP_ENV_SITE} was not set, but the resultant $ENV{APP_ENV_SITE} was not cached. This resulted in action-at-a-distance weirdness. Assume that the App::Env::Site package exists and sets
- $ENV{APP_ENV_SITE} = 'Site1';
- Then this code causes hard to debug bugs:
- { local %ENV = %ENV; require App::Env;
- This will load App::Env::Site and thus load App::Env::Site1::MyApp1 App::Env::import( 'MyApp1' );
- }
- This will NOT load App::Env::Site, as it has already been loaded,
- but the environment no longer contains $ENV{APP_ENV_SITE}, this
- this will load App::Env::MyApp2, not App::Env::Site1::MyApp2 App::Env::import( 'MyApp2' );
- { local %ENV = %ENV; require App::Env;
- This is just too fragile. Now when App::Env is loaded, it caches the final version of $ENV{APP_ENV_SITE}. Code which needs to change the site in mid-program, can use the Site parameter.
Documentation
execute a command under a specified environmentModules
manage application specific environmentsexample application environment module for App::Env.return a snapshot of the current environmentModule Install Instructions
To install App::Env, copy and paste the appropriate command in to your terminal.
cpanm App::Env
perl -MCPAN -e shell install App::Env
For more information on module installation, please visit the detailed CPAN module installation guide.