Skip to content
Snippets Groups Projects
Commit 2c90d6ef authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

fixed a few deprecation warnings

parent cdcffdfc
Branches
No related tags found
No related merge requests found
...@@ -157,7 +157,7 @@ sub get_project ...@@ -157,7 +157,7 @@ sub get_project
print "new seq: ", main::Dumper ($seq); print "new seq: ", main::Dumper ($seq);
# if ($be eq 'MongoDB') # if ($be eq 'MongoDB')
# { # {
# $obj->{'_maint'}->insert ( { 'an' => 'seq', 'av' => $seq } ); # $obj->{'_maint'}->insert_one ( { 'an' => 'seq', 'av' => $seq } );
# } # }
# else # else
# { # {
...@@ -279,7 +279,7 @@ sub save ...@@ -279,7 +279,7 @@ sub save
} }
# print "new_reg: ", main::Dumper ($new_reg); # print "new_reg: ", main::Dumper ($new_reg);
$obj->{'_cat'}->update ($search, $new_reg, { 'upsert' => 1 } ); $obj->{'_cat'}->replace_one ($search, $new_reg, { 'upsert' => 1 } );
} }
} }
...@@ -295,7 +295,7 @@ sub mdb_get_seq_for_key ...@@ -295,7 +295,7 @@ sub mdb_get_seq_for_key
return $kv->{'seq'} if (defined ($kv)); return $kv->{'seq'} if (defined ($kv));
$s->{'seq'}= my $seq= $obj->next_seq (); $s->{'seq'}= my $seq= $obj->next_seq ();
$k->insert ($s); $k->insert_one ($s);
$seq; $seq;
} }
...@@ -373,7 +373,7 @@ sub load_single_toc ...@@ -373,7 +373,7 @@ sub load_single_toc
my $cache= shift; # TODO: what is that intended for?? my $cache= shift; # TODO: what is that intended for??
my $path_list= shift; my $path_list= shift;
# print __LINE__, " load_single_toc: store=[$store] path_list=[$path_list]\n"; # print __LINE__, ' ', scalar localtime(time()), " load_single_toc: store=[$store] path_list=[$path_list]\n";
if ((my $be= $reg->{'cfg'}->{'backend'}) eq 'TA::Hasher') if ((my $be= $reg->{'cfg'}->{'backend'}) eq 'TA::Hasher')
{ {
my $c= $reg->{'proj_cat'}; my $c= $reg->{'proj_cat'};
...@@ -657,7 +657,7 @@ sub remove_from_store ...@@ -657,7 +657,7 @@ sub remove_from_store
{ {
my ($id_str, $path)= @$item; my ($id_str, $path)= @$item;
print "drop: key=[$id_str] store=[$store] path=[$path]\n"; print "drop: key=[$id_str] store=[$store] path=[$path]\n";
$_cat->remove ( { 'key' => $id_str, 'type' => $objreg->{'key'}, $_cat->remove_one ( { 'key' => $id_str, 'type' => $objreg->{'key'},
'store' => $store, 'path' => $path } ); 'store' => $store, 'path' => $path } );
} }
return {}; # TODO: TA::Hasher variant returns dropped items return {}; # TODO: TA::Hasher variant returns dropped items
...@@ -905,7 +905,7 @@ sub _save_seq ...@@ -905,7 +905,7 @@ sub _save_seq
} }
else else
{ {
$reg->{'_maint'}->update ( { 'an' => 'seq' }, { 'an' => 'seq', 'av' => $reg->{'seq'} }, { 'upsert' => 1 } ); $reg->{'_maint'}->replace_one ( { 'an' => 'seq' }, { 'an' => 'seq', 'av' => $reg->{'seq'} }, { 'upsert' => 1 } );
} }
} }
......
...@@ -134,7 +134,7 @@ sub read_flist ...@@ -134,7 +134,7 @@ sub read_flist
my $md5cat= shift; my $md5cat= shift;
my $fnm= shift; my $fnm= shift;
print "reading reference list: [$fnm]\n"; print scalar localtime(time()), " reading reference list: [$fnm]\n";
unless (open (FI, $fnm)) unless (open (FI, $fnm))
{ {
print __LINE__, " could not open '$fnm'!\n"; print __LINE__, " could not open '$fnm'!\n";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment