rev 1948 - trunk/Email-Store/lib/Email/Store

[prev] [thread] [next] [lurker] [Date index for 2005/02/22]

From: richardc
Subject: rev 1948 - trunk/Email-Store/lib/Email/Store
Date: 11:38 on 22 Feb 2005
Author: richardc
Date: 2005-02-22 11:38:30 +0000 (Tue, 22 Feb 2005)
New Revision: 1948

Modified:
   trunk/Email-Store/lib/Email/Store/Date.pm
Log:
ob 80-char layout patch

Modified: trunk/Email-Store/lib/Email/Store/Date.pm
===================================================================
--- trunk/Email-Store/lib/Email/Store/Date.pm	2005-02-22 11:37:55 UTC (rev 1947)
+++ trunk/Email-Store/lib/Email/Store/Date.pm	2005-02-22 11:38:30 UTC (rev 1948)
@@ -1,11 +1,6 @@
 package Email::Store::Date;
-
-use 5.006;
 use strict;
 use warnings;
-
-our $VERSION = '1.1';
-
 use Email::Store::DBI;
 use base 'Email::Store::DBI';
 use Email::Store::Mail;
@@ -14,14 +9,14 @@
 use Date::Parse;
 
 Email::Store::Date->table("mail_date");
-Email::Store::Date->columns(All => qw/mail date year month day/);
-Email::Store::Date->columns(Primary => qw/mail/);
+Email::Store::Date->columns( All => qw/mail date year month day/ );
+Email::Store::Date->columns( Primary => qw/mail/ );
 Email::Store::Date->has_a( date => 'Time::Piece' );
 Email::Store::Date->has_a( mail => "Email::Store::Mail" );
-Email::Store::Mail->might_have( mail_date => "Email::Store::Date" => qw(date year month day));
+Email::Store::Mail->might_have( mail_date => "Email::Store::Date" =>
+                                  qw(date year month day) );
 
 
-
 sub on_store_order { 80 }
 
 sub on_store {
@@ -34,8 +29,13 @@
 
     my $time   = str2time($date);
     my $tp     = Time::Piece->new($time);
-    Email::Store::Date->create( { mail => $mail->id, date => $time, year => $tp->year, month => $tp->mon, day => $tp->mday } );
-
+    Email::Store::Date->create( {
+        mail  => $mail->id,
+        date  => $time,
+        year  => $tp->year,
+        month => $tp->mon,
+        day   => $tp->mday,
+    } );
 }
 
 sub _get_date_in_received_header {
@@ -100,7 +100,7 @@
     FROM mail_date, mail
     WHERE mail.message_id = mail_date.mail AND
     mail_date.date >= ? AND
-    mail_date.date <=  ?
+    mail_date.date <= ?
     ORDER BY mail_date.date DESC
 });
 
@@ -108,7 +108,7 @@
 1;
 __DATA__
 CREATE TABLE IF NOT EXISTS mail_date (
-    mail varchar(255) NOT NULL PRIMARY KEY,                                                 
+    mail varchar(255) NOT NULL PRIMARY KEY,
     date  int,
     year  int,
     month int,

Generated at 12:00 on 23 Feb 2005 by mariachi 0.52