Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Email-Folder CPAN distribution.

Report information
The Basics
Id: 17951
Status: resolved
Priority: 0/
Queue: Email-Folder

People
Owner: simonw [...] cpan.org
Requestors: perl [...] benizi.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.84
Fixed in: (no value)

Attachments


Subject: Email::Folder::Mbox clobbers $_
Download (untitled) / with headers
text/plain 482b
Following program didn't work as expected: (./mail_folders holds a bunch of mbox'es. Trying to find messages without Message-IDs.) find ./mail_folders/ -type f \ | perl -MEmail::Folder -lwe 'my $f = Email::Folder->new($_); while (my $m = $f->next_message) { next if $m->header("Message-ID"); print "$_\t".$m->header("Subject"); }' $_ contained mbox /^From / lines, rather than the filename it should. Attached patch fixes it. (Just localize $_ to the next_message method)
Subject: Email-Folder.patch
Download Email-Folder.patch
text/x-diff 534b
diff -ur Email-Folder-0.84/lib/Email/Folder/Mbox.pm Email-Folder-new/lib/Email/Folder/Mbox.pm --- Email-Folder-0.84/lib/Email/Folder/Mbox.pm 2004-12-17 07:34:54.000000000 -0500 +++ Email-Folder-new/lib/Email/Folder/Mbox.pm 2006-03-02 22:14:03.452543500 -0500 @@ -131,6 +131,7 @@ my $inheaders = 1; ++$count; print "$count starting scanning at line $.\n" if debug; + local $/; while (<$fh>) { if ($_ eq $/ && $inheaders) { # end of headers print "$count end of headers at line $.\n" if debug;


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.