projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
show git branch in show/version
[spider.git]
/
perl
/
convert-users-v3-to-v4.pl
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 {