App-Env

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


  [BUGFIX]

    * previous conversion from die to croak wasn't complete

1.01      2022-07-06 18:59:44-04:00 America/New_York

  [BUGFIX]

    * The Site parameter to import() or new() can ignore (rather than
      replace) the default Site specification if it is set to undef or
      ''; this was not properly documented or implemented.

1.00      2022-07-06 18:08:33-04:00 America/New_York

  [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' );

     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.


0.36 2022-07-05 16:38:55-04:00 America/New_York

  [ENHANCEMENT]

    * appexec:

        * new option, --define, which specifies extra environment
          variables to be addto to the application environment.

        * new option, --delete, which specifies environment variables
          to be deleted from the application environment.

        * --dumpenv:

            * new format, 'auto', which outputs the environment as
              commands for the current shell

            * now uses Shell::Config::Generate to generate commands
              to set environment variables for shells

            * new format, 'values', which outputs only environment
              variable values

            * new format, 'json', which outputs in JSON

            * new format, 'delta-json', which outputs in JSON the
              differences between the current and application
              environments

            * new format, 'delta-args', which outputs via appexec -D
              and -X options the differences between the current and
              application environments


        * new option, --dumpvar, which specifies which environment
          variables to dump


0.35      2020-05-04 11:14:40-04:00 America/New_York

  [ENHANCMENT]

    * new method, 'which', searches environment's path for executable

  [BUILD]

    * public repository is now on GitLab


0.34      2018-04-02 11:03:48-04:00 America/New_York

  [BUG FIX]

    * compilation of App::Env would fail if Capture::Tiny was
      previously loaded



( run in 2.003 seconds using v1.01-cache-2.11-cpan-b16cb0d3907 )