projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0c6e2c3
)
correct convert-users-v3-to-v4.pl
author
Dirk Koopman
<djk@tobit.co.uk>
Wed, 20 May 2020 14:20:25 +0000
(15:20 +0100)
committer
Dirk Koopman
<djk@tobit.co.uk>
Wed, 20 May 2020 14:20:25 +0000
(15:20 +0100)
perl/convert-users-v3-to-v4.pl
patch
|
blob
|
history
diff --git
a/perl/convert-users-v3-to-v4.pl
b/perl/convert-users-v3-to-v4.pl
index f8ac9bf42894827bad56d117a092eb134c3a60de..48ef0c00f7b8a4aeba3eb12605be482df3f820cf 100755
(executable)
--- a/
perl/convert-users-v3-to-v4.pl
+++ b/
perl/convert-users-v3-to-v4.pl
@@
-28,6
+28,7
@@
use JSON;
use Data::Structure::Util qw(unbless);
use Time::HiRes qw(gettimeofday tv_interval);
use IO::File;
use Data::Structure::Util qw(unbless);
use Time::HiRes qw(gettimeofday tv_interval);
use IO::File;
+use File::Copy;
use Carp;
use DB_File;
use Carp;
use DB_File;
@@
-64,7
+65,8
@@
if (-e $ofn || -e "$ofn.n") {
say "You appear to have (or are using) $ofn, creating $nfn instead";
$ofn = $nfn;
} else {
say "You appear to have (or are using) $ofn, creating $nfn instead";
$ofn = $nfn;
} else {
- say "using $ofn for output";
+ $ofn = "$ofn.n";
+ say "using $ofn.n for output";
}
}
@@
-89,7
+91,7
@@
if ($convert) {
unless ($@) {
if ($ref) {
unbless $ref;
unless ($@) {
if ($ref) {
unbless $ref;
- $ofh->print($json->encode($ref) . "\n");
+ $ofh->print(
"$ref->{call}\t" .
$json->encode($ref) . "\n");
$count++;
}
else {
$count++;
}
else {