From 271477d8c26794abd8310e2abb89b746204660af Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Thu, 22 Apr 2010 11:02:17 -0700 Subject: Bug 560009: Use firstidx from List::MoreUtils instead of lsearch r=timello, a=mkanat --- contrib/bzdbcopy.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'contrib') diff --git a/contrib/bzdbcopy.pl b/contrib/bzdbcopy.pl index a5e81d7f8..8491238b5 100755 --- a/contrib/bzdbcopy.pl +++ b/contrib/bzdbcopy.pl @@ -71,11 +71,9 @@ my $ident_char = $target_db->get_info( 29 ); # SQL_IDENTIFIER_QUOTE_CHAR # has customized their source DB, we still want the script to work, # and it may otherwise fail in that situation (that is, the tables # may not exist in the target DB). -my @table_list = $target_db->bz_table_list_real(); - -# We don't want to copy over the bz_schema table's contents. -my $bz_schema_location = lsearch(\@table_list, 'bz_schema'); -splice(@table_list, $bz_schema_location, 1) if $bz_schema_location > 0; +# +# We don't want to copy over the bz_schema table's contents, though. +my @table_list = grep { $_ ne 'bz_schema' } $target_db->bz_table_list_real(); # Instead of figuring out some fancy algorithm to insert data in the right # order and not break FK integrity, we just drop them all. -- cgit v1.2.3-24-g4f1b