projects
/
Biblio-Isis
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
support for repeatable subfields, version bump to 0.20
[Biblio-Isis]
/
scripts
/
dump_isisdb.pl
diff --git
a/scripts/dump_isisdb.pl
b/scripts/dump_isisdb.pl
index
19e46c2
..
c2f5227
100755
(executable)
--- a/
scripts/dump_isisdb.pl
+++ b/
scripts/dump_isisdb.pl
@@
-1,11
+1,20
@@
#!/usr/bin/perl -w
use strict;
#!/usr/bin/perl -w
use strict;
-
#
use blib;
+use blib;
use Biblio::Isis;
use Getopt::Std;
use Biblio::Isis;
use Getopt::Std;
-use Data::Dumper;
+
+BEGIN {
+ eval "use Data::Dump";
+
+ if (! $@) {
+ *Dumper = *Data::Dump::dump;
+ } else {
+ use Data::Dumper;
+ }
+}
my %opt;
getopts('dn:', \%opt);
my %opt;
getopts('dn:', \%opt);
@@
-14,7
+23,7
@@
my $isisdb = shift @ARGV || die "usage: $0 [-n number] [-d] /path/to/isis/BIBL\n
my $isis = Biblio::Isis->new (
isisdb => $isisdb,
my $isis = Biblio::Isis->new (
isisdb => $isisdb,
- debug => $opt{'d'},
+ debug => $opt{'d'}
? 2 : 0
,
include_deleted => 1,
# read_fdt => 1,
);
include_deleted => 1,
# read_fdt => 1,
);
@@
-23,6
+32,7
@@
print "rows: ",$isis->count,"\n\n";
my $min = 1;
my $max = $isis->count;
my $min = 1;
my $max = $isis->count;
+$max = $opt{n} if ($opt{n});
for my $mfn ($min .. $max) {
print STDERR Dumper($isis->to_hash($mfn)),"\n" if ($opt{'d'});
for my $mfn ($min .. $max) {
print STDERR Dumper($isis->to_hash($mfn)),"\n" if ($opt{'d'});