summaryrefslogtreecommitdiff
path: root/make/console.pm
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-03-26 23:13:15 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-03-26 23:13:15 +0100
commite3303330f8cc04121907715d789370f492878646 (patch)
tree78057af511efaa4b9ff3c2be9646d72c2f1c427a /make/console.pm
parentaaae660fee19a56c752bdec84da86c4b1e779af0 (diff)
parentaae283e1dd292ace3a02809ca571a72eb06d9732 (diff)
Merge pull request #1021 from SaberUK/master+perl510
Convert build system to Perl 5.10.
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;
}