From aae283e1dd292ace3a02809ca571a72eb06d9732 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 21 Mar 2015 20:04:03 +0000 Subject: Convert the build system to Perl 5.10. Thanks to Kross for the heads up on "use feature". --- make/console.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'make/console.pm') diff --git a/make/console.pm b/make/console.pm index 045df8a70..4e7b32d49 100644 --- a/make/console.pm +++ b/make/console.pm @@ -20,9 +20,10 @@ package make::console; BEGIN { - require 5.8.0; + require 5.10.0; } +use feature ':5.10'; use strict; use warnings FATAL => qw(all); @@ -55,7 +56,7 @@ sub __console_format($$) { sub print_format($;$) { my $message = shift; - my $stream = shift || *STDOUT; + my $stream = shift // *STDOUT; while ($message =~ /(<\|(\S+)\s(.+?)\|>)/) { my $formatted = __console_format $2, $3; $message =~ s/\Q$1\E/$formatted/; @@ -106,7 +107,7 @@ sub prompt_string($$$) { print_format "$question\n"; print_format "[<|GREEN $default|>] => "; chomp(my $answer = ); - print "\n"; + say ''; return $answer ? $answer : $default; } -- cgit v1.2.3