From 45a4eea5b94d5a90aa83014c51366d42c39ed746 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 17 Aug 2011 13:18:47 +0200 Subject: Bug 662070: Use say() instead of print() where appropriate r=glob a=LpSolit --- Bugzilla/Install.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'Bugzilla/Install.pm') diff --git a/Bugzilla/Install.pm b/Bugzilla/Install.pm index ce8fe6bad..642165a43 100644 --- a/Bugzilla/Install.pm +++ b/Bugzilla/Install.pm @@ -34,7 +34,7 @@ use Bugzilla::Group; use Bugzilla::Product; use Bugzilla::User; use Bugzilla::User::Setting; -use Bugzilla::Util qw(get_text); +use Bugzilla::Util qw(get_text say); use Bugzilla::Version; use constant STATUS_WORKFLOW => ( @@ -188,7 +188,7 @@ sub update_settings { my $any_settings = $dbh->selectrow_array( 'SELECT 1 FROM setting ' . $dbh->sql_limit(1)); if (!$any_settings) { - print get_text('install_setting_setup'), "\n"; + say get_text('install_setting_setup'); } my %settings = %{SETTINGS()}; @@ -210,7 +210,7 @@ sub update_system_groups { # adding groups. my $editbugs_exists = new Bugzilla::Group({ name => 'editbugs' }); if (!$editbugs_exists) { - print get_text('install_groups_setup'), "\n"; + say get_text('install_groups_setup'); } # Create most of the system groups @@ -281,7 +281,7 @@ sub init_workflow { my $has_workflow = $dbh->selectrow_array('SELECT 1 FROM status_workflow'); return if $has_workflow; - print get_text('install_workflow_init'), "\n"; + say get_text('install_workflow_init'); my %status_ids = @{ $dbh->selectcol_arrayref( 'SELECT value, id FROM bug_status', {Columns=>[1,2]}) }; @@ -316,7 +316,7 @@ sub create_admin { my $full_name = $answer{'ADMIN_REALNAME'}; if (!$login || !$password || !$full_name) { - print "\n" . get_text('install_admin_setup') . "\n\n"; + say "\n" . get_text('install_admin_setup') . "\n"; } while (!$login) { @@ -325,7 +325,7 @@ sub create_admin { chomp $login; eval { Bugzilla::User->check_login_name_for_creation($login); }; if ($@) { - print $@ . "\n"; + say $@; undef $login; } } @@ -383,7 +383,7 @@ sub make_admin { } if (Bugzilla->usage_mode == USAGE_MODE_CMDLINE) { - print "\n", get_text('install_admin_created', { user => $user }), "\n"; + say "\n", get_text('install_admin_created', { user => $user }); } } @@ -408,7 +408,7 @@ sub _prompt_for_password { chomp $pass2; eval { validate_password($password, $pass2); }; if ($@) { - print "\n$@\n"; + say "\n$@"; undef $password; } system("stty","echo") unless ON_WINDOWS; @@ -430,7 +430,7 @@ sub reset_password { my $password = _prompt_for_password($prompt); $user->set_password($password); $user->update(); - print "\n", get_text('install_reset_password_done'), "\n"; + say "\n", get_text('install_reset_password_done'); } 1; -- cgit v1.2.3-24-g4f1b