summaryrefslogtreecommitdiff
path: root/make/console.pm
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2015-03-21 20:04:03 +0000
committerPeter Powell <petpow@saberuk.com>2015-03-25 19:01:33 +0000
commitaae283e1dd292ace3a02809ca571a72eb06d9732 (patch)
tree78057af511efaa4b9ff3c2be9646d72c2f1c427a /make/console.pm
parentaaae660fee19a56c752bdec84da86c4b1e779af0 (diff)
Convert the build system to Perl 5.10.
Thanks to Kross for the heads up on "use feature".
Diffstat (limited to 'make/console.pm')
-rw-r--r--make/console.pm7
1 files changed, 4 insertions, 3 deletions
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 = <STDIN>);
- print "\n";
+ say '';
return $answer ? $answer : $default;
}