Parent Directory | Revision Log
tool to dump BerkeleyDB database (for debugging)
1 | #!/usr/bin/perl -w |
2 | |
3 | use strict; |
4 | use BerkeleyDB; |
5 | |
6 | my $db_file=shift @ARGV; |
7 | if (! $db_file) { |
8 | print "usage: $0 [BerkeleyDB file]\n"; |
9 | exit 1; |
10 | } |
11 | |
12 | my %db_file; |
13 | tie %db_file, "BerkeleyDB::Hash", |
14 | -Filename => $db_file, |
15 | -Flags => DB_RDONLY |
16 | or die "Cannot open file $db_file: $! $BerkeleyDB::Error\n" ; |
17 | |
18 | foreach (sort keys %db_file) { |
19 | print "$_\t",$db_file{$_},"\n"; |
20 | } |
21 | untie %db_file; |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |