Replaced println with say.

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