Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [V3] scancpan: improve message when bad host perl version
@ 2016-06-16 16:26 Francois Perrad
  2016-06-16 20:08 ` Yann E. MORIN
  2016-07-04 15:45 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Francois Perrad @ 2016-06-16 16:26 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 support/scripts/scancpan | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/support/scripts/scancpan b/support/scripts/scancpan
index 6c70cfb..617ee71 100755
--- a/support/scripts/scancpan
+++ b/support/scripts/scancpan
@@ -471,7 +471,7 @@ unshift @INC, sub {
 } # END OF FATPACK CODE
 
 
-use 5.022;      # same major version as target perl
+use 5.010;
 use strict;
 use warnings;
 use Fatal qw(open close);
@@ -484,6 +484,17 @@ use HTTP::Tiny;
 use Safe;
 use MetaCPAN::API::Tiny;
 
+die <<"MSG" if $] < 5.022;
+This script needs a host perl with the same major version as Buildroot target perl.
+
+Your current host perl is:
+    $^X
+    version $]
+
+You may install a local one by running:
+    perlbrew install perl-5.22.2
+MSG
+
 my ($help, $man, $quiet, $force, $recommend, $test, $host);
 my $target = 1;
 GetOptions( 'help|?' => \$help,
@@ -746,10 +757,6 @@ support/scripts/scancpan Try-Tiny Moo
 
 =head1 SYNOPSIS
 
-curl -kL http://install.perlbrew.pl | bash
-
-perlbrew install perl-5.18.2
-
 supports/scripts/scancpan [options] [distname ...]
 
  Options:
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-04 15:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-16 16:26 [Buildroot] [V3] scancpan: improve message when bad host perl version Francois Perrad
2016-06-16 20:08 ` Yann E. MORIN
2016-06-17  5:47   ` François Perrad
2016-07-04 15:45 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox