[prev] [thread] [next] [lurker] [Date index for 2005/02/04]
Author: richardc Date: 2005-02-04 05:13:45 +0000 (Fri, 04 Feb 2005) New Revision: 1814 Added: trunk/Email-Store-Pristine/ trunk/Email-Store-Pristine/Build.PL trunk/Email-Store-Pristine/MANIFEST.SKIP trunk/Email-Store-Pristine/lib/ trunk/Email-Store-Pristine/lib/Email/ trunk/Email-Store-Pristine/lib/Email/Store/ trunk/Email-Store-Pristine/lib/Email/Store/Pristine.pm trunk/Email-Store-Pristine/t/ trunk/Email-Store-Pristine/t/00compile.t trunk/Email-Store-Pristine/t/attach-test trunk/Email-Store-Pristine/t/mailman-test trunk/Email-Store-Pristine/t/pristine.t Log: first draft Added: trunk/Email-Store-Pristine/Build.PL =================================================================== --- trunk/Email-Store-Pristine/Build.PL 2005-02-04 04:36:29 UTC (rev 1813) +++ trunk/Email-Store-Pristine/Build.PL 2005-02-04 05:13:45 UTC (rev 1814) @@ -0,0 +1,15 @@ +use strict; +use Module::Build; +Module::Build->new( + module_name => 'Email::Store::Pristine', + license => 'perl', + requires => { + 'perl' => 5.006, + 'Email::Store' => 0, + }, + build_requires => { + 'Test::More' => 0, + 'DBD::SQLite' => 0, + }, + create_makefile_pl => 'traditional', + )->create_build_script; Added: trunk/Email-Store-Pristine/MANIFEST.SKIP =================================================================== --- trunk/Email-Store-Pristine/MANIFEST.SKIP 2005-02-04 04:36:29 UTC (rev 1813) +++ trunk/Email-Store-Pristine/MANIFEST.SKIP 2005-02-04 05:13:45 UTC (rev 1814) @@ -0,0 +1,20 @@ +CVS/.* +\.svn/.* +\.cvsignore$ +\.Inline/.* +_Inline/.* +\.bak$ +\.tar$ +\.tgz$ +\.tar\.gz$ +~$ +^mess/ +^tmp/ +^testdata/ +^blib/ +^Makefile$ +^Makefile\.[a-z]+$ +^Build$ +^pm_to_blib$ +^_build/.* +~$ \ No newline at end of file Added: trunk/Email-Store-Pristine/lib/Email/Store/Pristine.pm =================================================================== --- trunk/Email-Store-Pristine/lib/Email/Store/Pristine.pm 2005-02-04 04:36:29 UTC (rev 1813) +++ trunk/Email-Store-Pristine/lib/Email/Store/Pristine.pm 2005-02-04 05:13:45 UTC (rev 1814) @@ -0,0 +1,72 @@ +=head1 NAME + +Email::Store::Pristine - keep a pristine copy of the mail + +=head1 DESCRIPTION + + +=head1 AUTHOR + +Richard Clamp <richardc@xxxxxxxxx.xxx> + +=head1 COPYRIGHT + +Copyright 2005 Richard Clamp. All Rights Reserved. + +This program is free software; you can redistribute it +and/or modify it under the same terms as Perl itself. + +=head1 SEE ALSO + +L<Email::Store> + +=cut + + +package Email::Store::Pristine; +use strict; +use warnings; +use base 'Email::Store::DBI'; +__PACKAGE__->table("pristine_mail"); +__PACKAGE__->columns(All => qw/id mail message/); +__PACKAGE__->has_a(mail => 'Email::Store::Mail'); +Email::Store::Mail->has_many( pristine_copies => [ __PACKAGE__, 'mail' ] ); + +# I damn well want to be first +sub on_store_order { -20000 } +sub on_seen_duplcate_order { -20000 } + +sub _store { + my ($self, $mail, $message) = @_; + $mail->add_to_pristine_copies({ + mail => $mail, + message => $message, + }); +} + +sub on_store { + my ($self, $mail) = @_; + $self->_store( $mail, $mail->simple->as_string ); +} + +# don't store all duplicates, only the ones we've not got the exact +# same rfc2822 body for +sub on_seen_duplicate { + my ($self, $mail, $simple) = @_; + my $message = $simple->as_string; + for my $check ($mail->pristine_copies) { + return if $check->message eq $message; + } + $self->_store( $mail, $message ); +} + +sub message { die "which part of pristine didn't you get?" } + +1; +__END__ + +CREATE TABLE IF NOT EXISTS pristine_mail ( + id integer NOT NULL auto_increment primary key, + mail varchar(255) NOT NULL, + message text +); Added: trunk/Email-Store-Pristine/t/00compile.t =================================================================== --- trunk/Email-Store-Pristine/t/00compile.t 2005-02-04 04:36:29 UTC (rev 1813) +++ trunk/Email-Store-Pristine/t/00compile.t 2005-02-04 05:13:45 UTC (rev 1814) @@ -0,0 +1,3 @@ +# -*- cperl -*- +use Test::More tests => 1; +require_ok( "Email::Store::Pristine" ); Added: trunk/Email-Store-Pristine/t/attach-test =================================================================== --- trunk/Email-Store-Pristine/t/attach-test 2005-02-04 04:36:29 UTC (rev 1813) +++ trunk/Email-Store-Pristine/t/attach-test 2005-02-04 05:13:45 UTC (rev 1814) @@ -0,0 +1,115 @@ +From: Simon Cozens <simon@xxxxxxxxxxxx.xxx> +To: test@xxxx.xxx +Bcc: lathos@xxxxx.xxx +Subject: Test attachment +Mime-Version: 1.0 +Content-Type: multipart/mixed; boundary="n8g4imXOkfNTN/H1" +Content-Disposition: inline +X-Mutt-Fcc: =outbox-200406 +Status: RO +Content-Length: 6431 +Lines: 102 + + +--n8g4imXOkfNTN/H1 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline + +I am attaching two pointless attachments for your pleasure. + +--n8g4imXOkfNTN/H1 +Content-Type: application/x-tex +Content-Disposition: attachment; filename="foo.tex" +Content-Transfer-Encoding: quoted-printable + +Foo bar baz=0A +--n8g4imXOkfNTN/H1 +Content-Type: image/png +Content-Disposition: attachment; filename="tree.png" +Content-Transfer-Encoding: base64 + +iVBORw0KGgoAAAANSUhEUgAAAcEAAAFrBAMAAABbEi9TAAAAJFBMVEX///4AAP//AABfX1+f +n58fHx/f398/Pz9/f3+/v78AAAD////0RIvuAAAAAXRSTlMBN+Ho8AAAEMJJREFUeJztnU1z +2zYax/sVfPbN15yTmcjHTicz9rHLNiGPrpMd8Rq7U+ucnWl8zHSctU67NqWauqwtkZaFL7cE ++AaQAAiQAAWIeqa1KAoA8SMegCBe/vkB7Lj974dt50C37Qnttz2h/bYntN/2hPbbntB+2xOW +ttGZDY0mQLgJCeshU0qtiTDBW5BnbIPkE26qeKlZxcgjZPBBs4iRQ8jma/7VIGMSbppKqTGA +IcYi3AgUkR2IDEIxH7TCU+mEolm3AZFKKOKiqVngqDRCcUAbEGmEMrmWuRvbMQqhXBfb+A55 +nVC2VEz3UwqhZAqmF2KdULpiGV4Ta4TyRWJ4IdYIi2r1fcKJtroojw1vTmuERXbPeRmPA1oU +I61KWB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9tue0H7bE9pv +e0L7bU9ov+0J7bf//R9ggMNMNGhCWAAAAABJRU5ErkJggg== + +--n8g4imXOkfNTN/H1-- + Added: trunk/Email-Store-Pristine/t/mailman-test =================================================================== --- trunk/Email-Store-Pristine/t/mailman-test 2005-02-04 04:36:29 UTC (rev 1813) +++ trunk/Email-Store-Pristine/t/mailman-test 2005-02-04 05:13:45 UTC (rev 1814) @@ -0,0 +1,91 @@ +From templates-admin@xxxxxxxxxxxxxxxx.xxx Tue Nov 28 21:17:30 2000 +Envelope-to: mstevens@xxxxxxxxx.xxx +Received: from trinity.fluff.org [194.153.168.225] (mail) + by dayspring.firedrake.org with esmtp (Exim 3.12 #1 (Debian)) + id 140s82-0007x1-00; Tue, 28 Nov 2000 21:17:30 +0000 +Received: from www.ourshack.com (dog.ourshack.com) [212.74.28.146] + by trinity.fluff.org helo dog.ourshack.com with esmtp (Exim 3.12) + id 140s81-0003hh-00 for michael@xxxx.xxx + ; Tue, 28 Nov 2000 21:17:29 +0000 +Received: from localhost.ourshack.com ([127.0.0.1] helo=dog.ourshack.com) + by dog.ourshack.com with esmtp (Exim 3.16 #1) + id 140t7Y-000KE6-00; Tue, 28 Nov 2000 22:21:04 +0000 +Received: from dayspring.firedrake.org ([195.82.105.251] ident=mail) + by dog.ourshack.com with esmtp (Exim 3.16 #1) + id 140t6i-000KDq-00 + for templates@xxxxxxxxxxxxxxxx.xxx; Tue, 28 Nov 2000 22:20:12 +0000 +Received: from mstevens by dayspring.firedrake.org with local (Exim 3.12 #1 (Debian)) + id 140s6M-0007sK-00; Tue, 28 Nov 2000 21:15:46 +0000 +From: Michael Stevens <michael@xxxx.xxx> +To: templates@xxxxxxxxxxxxxxxx.xxx +Message-ID: <20001128211546.A29664@xxxxxxxxx.xxx> +Mail-Followup-To: templates@xxxxxxxxxxxxxxxx.xxx +Mime-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +User-Agent: Mutt/1.2.5i +Subject: [Templates] ttree problems - the sequel +Sender: templates-admin@xxxxxxxxxxxxxxxx.xxx +Errors-To: templates-admin@xxxxxxxxxxxxxxxx.xxx +X-BeenThere: templates@xxxxxxxxxxxxxxxx.xxx +X-Mailman-Version: 2.0rc1 +Precedence: bulk +List-Help: <mailto:templates-request@xxxxxxxxxxxxxxxx.xxx?subject=help> +List-Post: <mailto:templates@xxxxxxxxxxxxxxxx.xxx> +List-Subscribe: <http://www.template-toolkit.org/mailman/listinfo/templates>, + <mailto:templates-request@xxxxxxxxxxxxxxxx.xxx?subject=subscribe> +List-Id: Template Toolkit mailing list <templates.template-toolkit.org> +List-Unsubscribe: <http://www.template-toolkit.org/mailman/listinfo/templates>, + <mailto:templates-request@xxxxxxxxxxxxxxxx.xxx?subject=unsubscribe> +List-Archive: <http://www.template-toolkit.org/pipermail/templates/> +Date: Tue, 28 Nov 2000 21:15:46 +0000 +Status: RO + +Hi. + I finally had time to debug my problems with pre_process and ttree +in more detail. + +It turned out that ttree thinks PRE_PROCESS and POST_PROCESS are +multiple value fields, so it returns the values supplied for them as arrays, +eg + + pre_process = foo:bar + +is sent to Template as PRE_PROCESS => [ 'foo:bar' ]. The delimiter splitting +routines in Template::Service only split up if values are scalars rather +than array references, so it wasn't getting split, and therefore it tried +to pre_process the file 'foo:bar'. + +ttree learnt that those two fields were arrays sometime between beta5 and +rc2, I'm not sure why. + +One fix, as far as I can tell, is to apply this patch: + +--cut here for patch-- +diff -urN Template-Toolkit-2.00-rc2.orig/bin/ttree Template-Toolkit-2.00-rc2/bin/ttree +--- Template-Toolkit-2.00-rc2.orig/bin/ttree Tue Nov 28 20:56:28 2000 ++++ Template-Toolkit-2.00-rc2/bin/ttree Tue Nov 28 20:57:18 2000 +@@ -324,8 +324,8 @@ + 'template_pre_chomp|pre_chomp|prechomp', + 'template_post_chomp|post_chomp|postchomp', + 'template_trim|trim', +- 'template_pre_process|pre_process|preprocess=s@', +- 'template_post_process|post_process|postprocess=s@', ++ 'template_pre_process|pre_process|preprocess=s', ++ 'template_post_process|post_process|postprocess=s', + 'template_process|process=s', + 'template_default|default=s', + 'template_error|error=s', +--cut here for patch-- + +Which reverts this change. However, if this was originally done for a good +reason, it's not the end of the story. The modified version passes all tests +still, but I can't see that they actually exercise ttree. + +Michael + +_______________________________________________ +templates mailing list +templates@xxxxxxxxxxxxxxxx.xxx +http://www.template-toolkit.org/mailman/listinfo/templates + Added: trunk/Email-Store-Pristine/t/pristine.t =================================================================== --- trunk/Email-Store-Pristine/t/pristine.t 2005-02-04 04:36:29 UTC (rev 1813) +++ trunk/Email-Store-Pristine/t/pristine.t 2005-02-04 05:13:45 UTC (rev 1814) @@ -0,0 +1,16 @@ +# -*- cperl -*- +use Test::More tests => 20; +use File::Slurp; +BEGIN { unlink("t/test.db"); } +use Email::Store "dbi:SQLite:dbname=t/test.db"; +Email::Store->setup; +ok(1, "Set up"); + +my $data = read_file("t/mailman-test"); +Email::Store::Mail->store($data); + +# We need one mail: +my @mails = Email::Store::Mail->retrieve_all; +is(@mails, 1, "Only one mail"); +is($mails[0]->message_id, '20001128211546.A29664@xxxxxxxxx.xxx', "Correct ID"); +like($mails[0]->message, qr/PRE_PROCESS/, "Contains the right stuff");
Generated at 06:00 on 04 Feb 2005 by mariachi 0.52