Mail-Transport-Dbx
view release on metacpan or search on metacpan
=item B<emails>
In list context this method returns all emails contained in the file. In boolean (that is, scalar) context it returns a true value if the file contains emails and false if it contains subfolders.
if ($dbx->emails) {
print "I contain emails";
} else {
print "I contain subfolders";
}
This is useful for iterations:
for my $msg ($dbx->emails) {
...
}
=item B<subfolders>
In list context this method returns all subfolders of the current file as C<Mail::Transport::Dbx::Folder> objects. In boolean (scalar) context it returns true of the file contains subfolders and false if it contains emails.
Remember that you still have to call C<dbx()> on these subfolders if you want to do something useful with them:
( run in 1.888 second using v1.01-cache-2.11-cpan-71847e10f99 )