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/DB.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Bugzilla/DB.pm') diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 8d1cf32a0..3c37c0dbd 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -250,7 +250,7 @@ sub bz_create_database { if (!$conn_success) { $dbh = _get_no_db_connection(); - print "Creating database $db_name...\n"; + say "Creating database $db_name..."; # Try to create the DB, and if we fail print a friendly error. my $success = eval { @@ -483,7 +483,7 @@ sub bz_setup_database { my @desired_tables = $self->_bz_schema->get_table_list(); my $bugs_exists = $self->bz_table_info('bugs'); if (!$bugs_exists) { - print install_string('db_table_setup'), "\n"; + say install_string('db_table_setup'); } foreach my $table_name (@desired_tables) { @@ -520,7 +520,7 @@ sub bz_setup_foreign_keys { my $activity_fk = $self->bz_fk_info('profiles_activity', 'userid'); my $any_fks = $activity_fk && $activity_fk->{created}; if (!$any_fks) { - print get_text('install_fk_setup'), "\n"; + say get_text('install_fk_setup'); } my @tables = $self->bz_table_list(); @@ -711,12 +711,12 @@ sub bz_alter_column_raw { $table, $name, $new_def, defined $set_nulls_to ? $self->quote($set_nulls_to) : undef); my $new_ddl = $self->_bz_schema->get_type_ddl($new_def); - print "Updating column $name in table $table ...\n"; + say "Updating column $name in table $table ..."; if (defined $current_def) { my $old_ddl = $self->_bz_schema->get_type_ddl($current_def); - print "Old: $old_ddl\n"; + say "Old: $old_ddl"; } - print "New: $new_ddl\n"; + say "New: $new_ddl"; $self->do($_) foreach (@statements); } @@ -810,7 +810,7 @@ sub _bz_add_table_raw { if (Bugzilla->usage_mode == USAGE_MODE_CMDLINE and !$options->{silently}) { - print install_string('db_table_new', { table => $name }), "\n"; + say install_string('db_table_new', { table => $name }); } $self->do($_) foreach (@statements); } @@ -1317,7 +1317,7 @@ sub _bz_init_schema_storage { $self->_bz_add_table_raw('bz_schema'); } - print install_string('db_schema_init'), "\n"; + say install_string('db_schema_init'); my $sth = $self->prepare("INSERT INTO bz_schema " ." (schema_data, version) VALUES (?,?)"); $sth->bind_param(1, $store_me, $self->BLOB_TYPE); -- cgit v1.2.3-24-g4f1b