Remove dependencies on Hash::Merge and Clone::Choose
stow 2.3.0 added external runtime dependencies on Hash::Merge and Clone::Choose. Historically stow hasn't had runtime dependencies other than Perl itself, which is a useful property if you're managing the installation of Perl using stow; the bootstrapping instructions in stow's manual would need updating to describe how to install these two modules (and any dependencies they have now or in the future) as well. However, Hash::Merge is much more general than stow actually needs, so replace the merge() call with a few lines of equivalent code -- this avoids the external dependencies, and is clearer than the merge() call. Many thanks to Adam Sampson for this patch: https://lists.gnu.org/archive/html/bug-stow/2019-06/msg00001.html
This commit is contained in:
parent
4a9121eec9
commit
9ce10eb3b1
6 changed files with 43 additions and 19 deletions
|
@ -22,7 +22,7 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 33;
|
||||
use Test::More tests => 34;
|
||||
|
||||
use testutil;
|
||||
|
||||
|
@ -120,16 +120,19 @@ is($options->{dir}, "$ABS_TEST_DIR/stow"
|
|||
=> "-d from \$HOME/.stowrc");
|
||||
|
||||
#
|
||||
# Test ~/.stowrc file is overridden by .stowrc in cwd.
|
||||
# Test that some but not all options ~/.stowrc file are overridden by
|
||||
# .stowrc in cwd.
|
||||
#
|
||||
local @ARGV = ('dummy');
|
||||
make_file($HOME_RC_FILE, <<HERE);
|
||||
-d $ABS_TEST_DIR/stow-will-be-overridden
|
||||
--target $ABS_TEST_DIR/target-will-be-overridden
|
||||
--defer=info
|
||||
HERE
|
||||
make_file($CWD_RC_FILE, <<HERE);
|
||||
-d $ABS_TEST_DIR/stow
|
||||
--target $ABS_TEST_DIR/target
|
||||
--defer=man
|
||||
HERE
|
||||
|
||||
($options, $pkgs_to_delete, $pkgs_to_stow) = process_options();
|
||||
|
@ -137,6 +140,8 @@ is($options->{target}, "$ABS_TEST_DIR/target"
|
|||
=> "--target overridden by \$PWD/.stowrc");
|
||||
is($options->{dir}, "$ABS_TEST_DIR/stow"
|
||||
=> "-d overridden \$PWD/.stowrc");
|
||||
is_deeply($options->{defer}, [qr(\Ainfo), qr(\Aman)],
|
||||
'defer man and info');
|
||||
unlink($CWD_RC_FILE) or die "Failed to unlink $CWD_RC_FILE";
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue