#!/usr/bin/env perl # -*- perl -*- # # $Id: show_db,v 2.8 2002/10/15 05:52:20 eserte Exp $ # Author: Slaven Rezic # # Copyright (c) 1997-2002 Slaven Rezic. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # # Mail: # WWW: # =head1 NAME show_db - take a quick look into dbm files =head1 SYNOPSIS show_db [-dbtype type] [-d delim] [-v] [-showtable] [-key spec] [-val spec] [-color] [-sel key] dbmfile =head1 DESCRIPTION C shows the content of a dbm database file (like DB_File, GDBM_File, or CDB_File). There is also some support for MLDBM databases. =head2 OPTIONS =over =item -dbtype type The type of the database. This is usually the class name like C. Normally, C tries to determine itself, so you do not have to specify this option. Variants of the database type may be specified with a comma-separated list. Currently valid variants are: =over =item DB_File,RECNO The keys are the array indexes of the recno database. =item MLDBM,I,I where I is C or another dbm class and I is C or another serializer class. =back =item -v Be verbose. Multiple C<-v> cause more verbosity. =item -showtable Pipe the output to C from the C distribution. =item -color Color the key values. Needs the C module installed. =item -key spec =item -val spec Treat the keys or values as special data structures: =over =item pack:I C will be used on the data. See L for the format of I. =item storable The data will be handled as serialized by Storable. =item freezethaw The data will be handled as serialized by FreezeThaw. =item perldata The data will be handled as a perl value or reference. =back The C<-key> and C<-val> specifications may be overriden by C<-color>. The values of MLDBM databases are handled according to the I variant. =item -sel key Select the value for the specified C from the database. The C