Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Display filenames in mbox folder

by Anonymous Monk
on Mar 01, 2015 at 00:56 UTC ( [id://1118221]=note: print w/replies, xml ) Need Help??


in reply to Display filenames in mbox folder

The documentation for "readMessageFilename" is at Mail::Box::Dir

The source of readMessageFilenames in Mail::Box::Dir is "sub readMessageFilenames() {shift->notImplemented}", so $folder is likely one of its subclasses, Mail::Box::MH or Mail::Box::Maildir, can you tell us which one? (try print ref $folder;)

More information would be useful. What is $filename - a single file, or a directory? What does "The number of files is not correct" mean? Most importantly, what files are in the folder you are looking at; i.e. what is your expected output? Also, Basic debugging checklist and How do I post a question effectively?

Replies are listed 'Best First'.
Re^2: Display filenames in mbox folder
by peterr (Scribe) on Mar 01, 2015 at 01:42 UTC

    The source of readMessageFilenames in Mail::Box::Dir is "sub readMessageFilenames() {shift->notImplemented}"

    I just downloaded version 2.118 of Mail::Box and yes, "readMessageFilenames" is unimplemented.

    so $folder is likely one of its subclasses, Mail::Box::MH or Mail::Box::Maildir

    Yes, in the same vers 2.118 I can see that Mail::Box::MH and Mail::Box::Maildir seem okay (implemented)

    can you tell us which one? (try print ref $folder;)

    The print displays Mail::Box::Maildir

    More information would be useful. What is $filename - a single file, or a directory? What does "The number of files is not correct" mean? Most importantly, what files are in the folder you are looking at; i.e. what is your expected output? Also, Basic debugging checklist

    $filename is a directory. The number of files should be 592. The script posted only parses through 591 files, and also displays 591 files. Other small perl scripts I have run state 592 files. I need to determine which file is being missed, and then determine the reason why.

    I'm using the Perl debugger quite a lot with this. Thanks. :)

      readMessageFilenames in Mail::Box::Maildir does exclude some files. Look for the file whose name does not match the pattern /^([0-9][\w.:,=\-]+)$/. It also does some trickery with the numbers that the filenames are supposed to start with, so if you've got two files that are named something like like "0012345abc" and "012345abc", one of those is going to get ignored.

        Look for the file whose name does not match the pattern /^(0-9\w.:,=\-+)$/

        When I did a grep with that pattern, for the folder, there was no output ? Also when stepping through with the debugger, moved the mouse over the line my @files = map { /^([0-9][\w.:,=\-]+)$/ and it said something about syntax error. I will look into use Carp to get the error pushed out to a file.

        It also does some trickery with the numbers that the filenames are supposed to start with, so if you've got two files that are named something like like "0012345abc" and "012345abc", one of those is going to get ignored.

        I ran a folder compare on ../new and ../cur paths (total of 592 files), and there are no filenames with the same name. Also there are no filenames that begin with zero. The range is 1231125716.6864.bLyyk:2,S to 1422830161.R3.asus64:2,S

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1118221]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-26 05:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found