Commit graph

15 commits

Author SHA1 Message Date
Charles LeDoux
4d1167ffd7 Parse cli and stowrc files separately
Why:

* We want to selectively apply expansion to:
    * Only options from stowrc files.
    * Only options that take a path.
* This requires ability to:
    * Differentiate cli options from stowrc options
    * Distinguish between individual stowrc options.

This change addresses the need by:

* Options from ARGV and stowrc files are separately parsed, resulting in
  two options hashes.
    * Creating an option hash from stowrc files allows modification of
      specific arguments without having to rely on something like regex
      parsing of the options.

* get_config_file_options modified to return options hash.
    * Uses the same parse_options function that parses ARGV

* Add Hash:Merge to dependencies in order to merge the two option
  hashes.

* process_options() merges the two option hashes.
    * Get option hash for ARGV
    * Get option hash from get_config_file_options().
    * Merge the two hashes with Hash::Merge.
    * Sanitation and checks are ran on the merged options.

* The options -S, -D, and -R are ignored in stowrc files.
    * Due to the way argument parsing happens, the effect of these
      actions is not carried from stowrc into parsing of cli options.
    * It doesn't seem to make sense to put these options in stowrc
      anyway.
2019-06-25 19:38:25 +01:00
Adam Spiers
6e5209fb2d Bump version to 2.3.0 2016-11-20 22:57:39 +00:00
Adam Spiers
f24de47b82 add IO::Scalar to build_requires 2015-11-13 12:05:42 +00:00
Adam Spiers
ab9d03535d Bump version to 2.2.2 2015-11-09 12:36:51 +00:00
Adam Spiers
43333b8eca add Stow/Util.pm.in with @VERSION@ substitution
This is now necessary in order to prevent pause.perl.org from
complaining:

    Status: Decreasing version number
    =================================

         module : Stow::Util
         version: undef
         in file: lib/Stow/Util.pm
         status : Not indexed because lib/Stow/Util.pm in
                 A/AS/ASPIERS/Stow-v2.2.0.tar.gz has a higher version number
                 (0)
2015-11-09 12:36:51 +00:00
Adam Spiers
c749cc4f26 Update META.{yml,json}
Rebuilt with newer Module::Build.
2015-11-09 09:27:49 +00:00
Adam Spiers
4cd91ed54c Bump version to 2.2.0 2012-02-18 20:33:34 +00:00
Adam Spiers
9889d10b2e Bump version to 2.1.3 2012-01-09 22:12:49 +00:00
Adam Spiers
6e5331814d Fix some incorrect CPAN meta-data about the project. 2011-12-15 21:14:07 +00:00
Adam Spiers
23fe1510d2 Bump version to 2.1.2. 2011-12-07 20:48:50 +00:00
Adam Spiers
d051936bf5 Bump version to 2.1.1 2011-12-06 17:42:02 +00:00
Adam Spiers
51b1bd3958 File::Slurp is no longer used. 2011-12-06 17:11:12 +00:00
Adam Spiers
a70302f99d Bump version to 2.1.0 2011-11-26 16:34:58 +00:00
Adam Spiers
59fa7ae4a6 Add build-time dependencies on Test::More and Test::Output. 2011-11-26 15:10:27 +00:00
Adam Spiers
58625800ee Reorganise more files into subdirectories and add CPAN support via Module::Build 2011-11-26 15:10:26 +00:00