rev 1878 - trunk/buscador/lib/Buscador

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

From: simon
Subject: rev 1878 - trunk/buscador/lib/Buscador
Date: 10:19 on 15 Feb 2005
Author: simon
Date: 2005-02-15 10:19:03 +0000 (Tue, 15 Feb 2005)
New Revision: 1878

Modified:
   trunk/buscador/lib/Buscador/UTF8.pm
Log:
No idea why that subjetc stuff was screwing up the name but it was. Huzzah!


Modified: trunk/buscador/lib/Buscador/UTF8.pm
===================================================================
--- trunk/buscador/lib/Buscador/UTF8.pm	2005-02-14 14:30:09 UTC (rev 1877)
+++ trunk/buscador/lib/Buscador/UTF8.pm	2005-02-15 10:19:03 UTC (rev 1878)
@@ -1,5 +1,27 @@
 package Buscador::UTF8;
 
+
+package Email::Store::Mail;
+use strict;
+
+sub body {
+    my $mail = shift;
+    my $mime = Email::MIME->new($mail->message);
+       
+    my $body = $mime->body;
+    my $charset = $mime->{ct}->{attributes}{charset};
+    if ($charset and $charset !~ /utf-?8/i) {
+        eval {
+            require Encode;
+            $body = Encode::decode($charset, $body);
+            Encode::_utf8_off($body);
+        };
+    }
+    $body;
+}
+
+1;
+
 =head1 NAME
 
 Buscador::UTF8 - Buscador plugin to encode the body of a message to UTF8
@@ -13,7 +35,7 @@
 
 Simon Cozens, <simon@xxxx.xxx>
 
-with work from 
+with work from
 
 Simon Wistow, <simon@xxxxxxxxxx.xxx>
 
@@ -24,33 +46,3 @@
 =cut
 
 
-package Email::Store::Mail;
-use strict;
-
-sub subject {
-    my $mail = shift;
-    my $mime = Email::MIME->new($mail->message);
-
-    my $subject = $mime->header('subject');
-    
-    return $subject;
-}
-
-sub body {
-    my $mail = shift;
-    my $mime = Email::MIME->new($mail->message);
-
-    my $body = $mime->body;
-
-    my $charset = $mime->{ct}->{attributes}{charset};
-    if ($charset and $charset !~ /utf-?8/i) {
-        eval {
-            require Encode;
-            $body = Encode::decode($charset, $body);
-            Encode::_utf8_off($body);
-        };
-    }
-    return $body;
-}
-
-1;

Generated at 04:00 on 24 Feb 2005 by mariachi 0.52