[Module-build-checkins] Module-Build/lib/Module/Build Base.pm,1.440,1.441
Status: Beta
Brought to you by:
kwilliams
|
From: Michael G S. <sc...@us...> - 2005-06-23 02:20:14
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19034/lib/Module/Build Modified Files: Base.pm Log Message: Functionalize detildefication. Add in code to handle hash parameters, currently only install_path Index: Base.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/Base.pm,v retrieving revision 1.440 retrieving revision 1.441 diff -u -d -r1.440 -r1.441 --- Base.pm 23 Jun 2005 01:54:55 -0000 1.440 +++ Base.pm 23 Jun 2005 02:20:02 -0000 1.441 @@ -1261,8 +1261,18 @@ # De-tilde-ify any path parameters for my $key (qw(prefix install_base destdir)) { next if !defined $args{$key}; - ($args{$key}) = glob($args{$key}) if $args{$key} =~ /^~/; + $args{$key} = _detildefy($args{$key}); + } + + for my $key (qw(install_path)) { + next if !defined $args{$key}; + + for my $subkey (keys %{$args{$key}}) { + next if !defined $args{$key}{$subkey}; + $args{$key}{$subkey} = _detildefy($args{$key}{$subkey}); + } } + if ($args{makefile_env_macros}) { require Module::Build::Compat; @@ -1272,6 +1282,14 @@ return \%args, $action; } + +sub _detildefy { + my $arg = shift; + + return $arg =~ /^~/ ? glob($arg) : $arg; +} + + # merge Module::Build argument lists that have already been parsed # by read_args(). Takes two references to option hashes and merges # the contents, giving priority to the first. |