Skip to Main Content
Perl in a Nutshell, 2nd Edition
book

Perl in a Nutshell, 2nd Edition

by Nathan Patwardhan, Ellen Siever, Stephen Spainhour
June 2002
Beginner content levelBeginner
759 pages
80h 42m
English
O'Reilly Media, Inc.
Content preview from Perl in a Nutshell, 2nd Edition

Name

new

Synopsis

$folder = new(ftype[, foldername][, options])

Creates a new Mail::Folder object of the specified type. Arguments are:

ftype

The type of folder. Possible values are mbox, maildir, emaul, or NNTP.

foldername

The name of the folder. If present, the open method is called with foldername as the argument.

options

A hash in which the following options may be the keys:

Content-Length

Content-length header is created or updated by append_message and update_message.

Create

If set, the folder is created if it doesn’t already exist.

DefaultFolderType

Autodetects folder type if create option is set and AUTODETECT has been set.

DotLock

Uses .lock-style folder locking with the proper folder interface (currently used only with the mbox interface).

Flock

Uses flock-style folder locking with the proper folder interface (currently used only with the mbox interface).

NFSLock

Deals with NFS-style file locking with the proper folder interface and the NFS server in question.

notMUA

If set, makes updates but doesn’t save message labels or the current message indicator. If not set (the default), saves labels and the current message indicator as appropriate for the folder interface.

Timeout

Overrides the default timeout value. Specified in seconds. Particularly useful for folder interfaces that involve network communications.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl by Example, Fourth Edition

Perl by Example, Fourth Edition

Ellie Quigley
Perl Cookbook, 2nd Edition

Perl Cookbook, 2nd Edition

Tom Christiansen, Nathan Torkington
Perl in a Nutshell

Perl in a Nutshell

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Learning Perl, 7th Edition

Learning Perl, 7th Edition

Randal L. Schwartz, brian d foy, Tom Phoenix

Publisher Resources

ISBN: 0596002416Errata Page