rev 1428 - in trunk/mariachi: . lib/Mariachi

[prev] [thread] [next] [lurker] [Date index for 2003/10/16]

From: richardc
Subject: rev 1428 - in trunk/mariachi: . lib/Mariachi
Date: 11:05 on 16 Oct 2003
Author: richardc
Date: 2003-10-16 11:05:27 +0100 (Thu, 16 Oct 2003)
New Revision: 1428

Modified:
   trunk/mariachi/TODO
   trunk/mariachi/lib/Mariachi/Message.pm
Log:
give _blat a meaningful name

Modified: trunk/mariachi/TODO
===================================================================
--- trunk/mariachi/TODO	2003-10-16 09:34:48 UTC (rev 1427)
+++ trunk/mariachi/TODO	2003-10-16 10:05:27 UTC (rev 1428)
@@ -19,8 +19,6 @@
 requite Mariachi::Message time, but we won't know where to put one
 until after argument parsing is done
 
-before_create trigger that can fill out the basic headings.
-
 mark the threading columns as Essential so that they get pulled in all
 at once
 

Modified: trunk/mariachi/lib/Mariachi/Message.pm
===================================================================
--- trunk/mariachi/lib/Mariachi/Message.pm	2003-10-16 09:34:48 UTC (rev 1427)
+++ trunk/mariachi/lib/Mariachi/Message.pm	2003-10-16 10:05:27 UTC (rev 1428)
@@ -18,11 +18,10 @@
 #these are just sops
 __PACKAGE__->columns( TEMP => qw( prev next root ) );
 
-# copy things out of the email::simple message and into the columns
-sub _blat {
+sub _header_column {
     my $thing = shift;
     $thing =~ tr/-/_/;
-    return lc $thing;
+    return "hdr_" . lc $thing;
 }
 
 =head1 NAME
@@ -48,7 +47,7 @@
     return $old if $old;
 
     my $data = {};
-    $data->{ 'hdr_' . _blat( $_ ) } = $mail->header($_) for
+    $data->{ _header_column $_ } = $mail->header($_) for
       qw( message-id from subject date references in-reply-to );
 
     $data->{body}       = $mail->body;
@@ -78,13 +77,13 @@
 
 sub header {
     my $self = shift;
-    my $meth = "hdr_" . _blat( shift );
+    my $meth = _header_column shift;
     $self->$meth();
 }
 
 sub header_set {
     my $self = shift;
-    my $meth = "hdr_" . _blat( shift );
+    my $meth = _header_column shift;
     $self->$meth( shift );
 }
 

Generated at 13:57 on 01 Jul 2004 by mariachi 0.52