blob: ee24cf89673fdca90a5e927ac62680b5d8d79d05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/usr/local/bin/perl
#-*- perl -*-
#
# Copyright (C) 2001 Ken'ichi Fukamachi
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
# $FML: __template.pm,v 1.5 2001/04/03 09:45:39 fukachan Exp $
#
use strict;
use Carp;
use lib qw(../../cpan/lib);
use Mail::Message;
for my $f (@ARGV) {
my $tmp = "/tmp/buf$$";
my $fh = new FileHandle $f;
my $wh = new FileHandle "> $tmp";
my $obj = Mail::Message->parse( $fh );
$wh->autoflush(1);
$obj->print($wh);
print "-- $f ";
system "diff -ub $f $tmp";
print $@ ? "fail\n": "ok\n";
}
exit 0;
|