Revert "Replaced println with say."

This reverts commit 30d9e11f1f.
This commit is contained in:
Matthew Barksdale committed 2011-02-19 04:02:16 -05:00
1 parent 30d9e11f1f
commit 445b7e0db3
1 file changed
+24 -25
+24 -25
View File
@@ -6,7 +6,6 @@
package Install; package Install;
use strict; use strict;
use warnings; use warnings;
use feature qw(say);
use English qw(-no_match_vars); use English qw(-no_match_vars);
use FindBin qw($Bin); use FindBin qw($Bin);
our $Bin = $Bin; our $Bin = $Bin;
@@ -22,11 +21,11 @@ my $features = 'base ssl sqlite';
if (defined $ARGV[0]) { if (defined $ARGV[0]) {
foreach (@ARGV) { foreach (@ARGV) {
if ($_ eq '-h' or $_ eq '--help') { if ($_ eq '-h' or $_ eq '--help') {
say '*** ./install help ***'; println '*** ./install help ***';
say ' --enable-sasl - Enable support for SASL.'; println ' --enable-sasl - Enable support for SASL.';
say ' --enable-ipv6 - Enable support for IPv6.'; println ' --enable-ipv6 - Enable support for IPv6.';
say ' --disable-ssl - Disable support for SSL.'; println ' --disable-ssl - Disable support for SSL.';
say '*** End of Help ***'; println '*** End of Help ***';
exit 1; exit 1;
} }
elsif ($_ eq '--enable-sasl') { elsif ($_ eq '--enable-sasl') {
@@ -45,16 +44,16 @@ if (defined $ARGV[0]) {
$features =~ s/(sqlite|mysql)/pgsql/g; $features =~ s/(sqlite|mysql)/pgsql/g;
} }
else { else {
say "Warning: Unknown option '$_'"; println "Warning: Unknown option '$_'";
} }
} }
} }
# Check Perl version. # Check Perl version.
say "Checking Perl version..... $^V"; println "Checking Perl version..... $^V";
eval { eval {
require 5.010_000; require 5.010_000;
} or say "This version of Perl is too old. Upgrade to Perl 5.10.0 or later and try again." and exit; } or println "This version of Perl is too old. Upgrade to Perl 5.10.0 or later and try again." and exit;
# Check operating system. # Check operating system.
print "Checking operating system..... $OSNAME - "; print "Checking operating system..... $OSNAME - ";
@@ -87,21 +86,21 @@ else {
} }
# Check for Perl core modules. # Check for Perl core modules.
say "Checking for core Perl modules....."; println "Checking for core Perl modules.....";
checkcore(); checkcore();
say "\0"; println "\0";
if ($ERROR) { if ($ERROR) {
say "This Perl install is missing some core modules. Consider reinstalling Perl."; println "This Perl install is missing some core modules. Consider reinstalling Perl.";
exit; exit;
} }
else { else {
say "All good."; println "All good.";
} }
# Check for required CPAN modules. # Check for required CPAN modules.
say "\0"; println "\0";
say 'Checking for required CPAN modules......'; println 'Checking for required CPAN modules......';
say "\0"; println "\0";
#modfind("Mouse"); #modfind("Mouse");
modfind('DBI'); modfind('DBI');
modfind('DBD::SQLite') if $features =~ /sqlite/; modfind('DBD::SQLite') if $features =~ /sqlite/;
@@ -111,19 +110,19 @@ modfind('Class::Unload');
modfind('IO::Socket::INET6') if $features =~ /ipv6/; modfind('IO::Socket::INET6') if $features =~ /ipv6/;
modfind('IO::Socket::SSL') if $features =~ /ssl/; modfind('IO::Socket::SSL') if $features =~ /ssl/;
modfind('MIME::Base64') if $features =~ /sasl/; modfind('MIME::Base64') if $features =~ /sasl/;
say "\0"; println "\0";
if ($ERROR) { if ($ERROR) {
say "Failed to install. Please install the missing CPAN modules and try again."; println "Failed to install. Please install the missing CPAN modules and try again.";
exit; exit;
} }
else { else {
say "All good."; println "All good.";
} }
# Create build. # Create build.
say "\0"; println "\0";
say "Building....."; println "Building.....";
if (!-d "$Bin/build") { if (!-d "$Bin/build") {
system "mkdir $Bin/build"; system "mkdir $Bin/build";
} }
@@ -141,13 +140,13 @@ if (!-e "$Bin/build/ver") {
} }
build($features); build($features);
say 'Done.'; println 'Done.';
say q{}; println q{};
installmods(); installmods();
say q{}; println q{};
# Success! # Success!
say "Done. Auto successfully installed."; println "Done. Auto successfully installed.";
# vim: set ai sw=4 ts=4: # vim: set ai sw=4 ts=4: