Now that Andreas is actively working on CPAN.pm and taking patches, it's tempting to add that to CPAN.pm.
my $make = $Config{make} . $Config{_exe};
my @path = split $Config{path_sep}, $ENV{PATH};
unless ( grep { -x File::Spec->catfile( $_, $make ) } @path ) {
# alien download and install
}
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
| [reply] [d/l] |
| [reply] |
my $banner = `nmake /?`;
or similar), and don't do the download if it already exists in the path.
The freely distributable version of nmake (v1.5) is useless for building many applications that require later versions, and having the installed later version blindly and silently overwritten or preempted by an unnecessary "clever hack" is intensely frustrating.
Personally, I think it would be much better to simply output a clear message if it cannot be found:
nmake.exe not found. Either make this available via your path variable, or download it from ...
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
Rather, just try invoking it via the shell
This is what alient_nmake.pl does, unless you use the --force argument it wont install if nmake is found.
---
$world=~s/war/peace/g
| [reply] |
Sounds like a patch!
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
| [reply] |