#!/usr/local/bin/perl -w

use Stream::IO;
use PGP::PacketFactory;

my $fis = new Stream::FileInput $ARGV[0];
my $dis = new Stream::DataInput $fis;

for (;;)
{
	my $packet = PGP::PacketFactory::restore($dis);
	last unless defined $packet;
	die $packet unless ref($packet);
	print "\n";
	print "Packet = ", ref($packet), "\n";
	print $packet, "\n";
	print $packet->asString(), "\n";
}
