From 42ef5ee48a2fe60fb4a4c461ac2ec5a868e97c5e Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 19 Aug 2008 04:29:28 +0000 Subject: [PATCH] =?utf8?q?Bug=20450609:=20Add=20OS=20detection=20in=20inst?= =?utf8?q?all-module.pl=20to=20make=20it=20refuse=20to=20run=20on=20Window?= =?utf8?q?s=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20Buclin=20=20r=3Dmkanat=20a=3DLpSolit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- install-module.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install-module.pl b/install-module.pl index a0de6d70ae..ca99ac23dc 100644 --- a/install-module.pl +++ b/install-module.pl @@ -46,6 +46,13 @@ GetOptions(\%switch, 'all|a', 'upgrade-all|u', 'show-config|s', 'global|g', 'help|h'); pod2usage({ -verbose => 1 }) if $switch{'help'}; + +if (ON_WINDOWS) { + print "\nYou cannot run this script on Windows. Please follow instructions\n"; + print "given by checksetup.pl to install missing Perl modules.\n\n"; + exit; +} + pod2usage({ -verbose => 0 }) if (!%switch && !@ARGV); set_cpan_config($switch{'global'}); @@ -98,7 +105,8 @@ __END__ =head1 NAME -install-module.pl - Installs or upgrades modules from CPAN +install-module.pl - Installs or upgrades modules from CPAN. +This script does not run on Windows. =head1 SYNOPSIS -- 2.47.2