rev 1486 - trunk/Email-Folder/lib/Email

[prev] [thread] [next] [lurker] [Date index for 2004/01/15]

From: simon
Subject: rev 1486 - trunk/Email-Folder/lib/Email
Date: 17:44 on 15 Jan 2004
Author: simon
Date: 2004-01-15 17:44:14 +0000 (Thu, 15 Jan 2004)
New Revision: 1486

Modified:
   trunk/Email-Folder/lib/Email/Folder.pm
Log:
Fix some documenation typos


Modified: trunk/Email-Folder/lib/Email/Folder.pm
===================================================================
--- trunk/Email-Folder/lib/Email/Folder.pm	2003-12-10 12:22:12 UTC (rev 1485)
+++ trunk/Email-Folder/lib/Email/Folder.pm	2004-01-15 17:44:14 UTC (rev 1486)
@@ -17,7 +17,7 @@
 
  my $folder = Email::Folder->new("some_file");
 
- print join "\n", map { $_->header("Subject") }, $folder->messages;
+ print join "\n", map { $_->header("Subject") } $folder->messages;
 
 =head1 METHODS
 
@@ -25,6 +25,9 @@
 
 Takes the name of a folder, and a hash of options
 
+If a 'reader' option is passed in then that is 
+used as the class to read in messages with.
+
 =cut
 
 sub new {
@@ -32,7 +35,13 @@
     my $folder = shift || carp "Must provide a folder name\n";
     my %self = @_;
 
-    my $reader = "Email::Folder::".folder_type($folder);
+    my $reader;
+
+    if ($self{reader}) {
+        $reader = $self{reader};
+    } else {
+        $reader = "Email::Folder::".folder_type($folder);
+    }
     eval "require $reader" or die $@;
 
     $self{_folder} = $reader->new($folder, @_);

Generated at 15:00 on 29 Nov 2006 by mariachi 0.52