#!/usr/local/bin/perl -w use strict; use VCP::Debug qw( :debug ); BEGIN { enable_debug ".*"; } use VCP::RevMapDB; my $db = VCP::RevMapDB->new( @ARGV ? ( StoreLoc => shift ) : () ); $db->open_existing_db; my( @keys, @vals ); my $w = 0; while ( my ( $k, $v ) = each %{$db->{Hash}} ) { $w = length $k if length $k > $w; push @keys, $k; push @vals, [ $db->unpack_values( $v ) ]; } ## This does not take file separators in to account, but that's ok ## for a debugging tool and the ids that are used as key values ## are supposed to be opaque anyway @keys = sort @keys; my $f = "%-${w}s => %s\n"; while ( @keys ) { my @v = @{shift @vals}; printf $f, shift @keys, @v == 1 ? $v[0] : join join( ",", @v ), "(", ")"; }