Mail::Box

Main
back: Autoloading on data
next: Tackle a Mail::Box

Now the use of autoloading of data implemented in Mail::Box. It looks quite tricky, and actually it certainly is. The user of an Mbox-folder (used as example) has his hands on a list of Mail::Box::Mbox::Message messages.

Well, yes and no: it's only half of the story: it is either the ::Parsed sub-class of the message, or the ::NotParsed version (respectively, the body of the message is read from its folder-file, or not read from its file yet). On the moment you need the body of the message, the AUTOLOADing of data is used to get the body content in.

The strategy used avoids the need for the user of the message to know whether the message has been read or not. Not reading the message, when it is never used, is much faster than reading it. It also is much more memory friendly and therefor suitable for huge folders. As long as you do not need all the messages, you gain. Otherwise you hardly lose anything.


 
Autoloading on data Tackle a Mail::Box

Created by Mark Overmeer with PPresenter on 11 July 2001