#! /usr/bin/perl
# Dump a Perl storable file to clear text
#
# Copyright (c) 2011 Steve Schnepp <steve.schnepp@pwkf.org>
#
# License: GPL

use strict;
use warnings;

use Storable;
use Data::Dumper;

$Data::Dumper::Indent = 1;
$Data::Dumper::Quotekeys = 0;
$Data::Dumper::Pair = ": ";
$Data::Dumper::Terse = 1;
$Data::Dumper::Deepcopy  = 1;

$Data::Dumper::Sortkeys = sub {
	my ($hash) = @_;
	my @keys = sort keys %$hash;
	@keys = grep { !/^#%#/ } @keys unless $ENV{KEEP_ALL};
	return \@keys;
};


while (my $file = shift) {
	my $ref = Storable::retrieve($file);
	print Dumper($ref);
}
