
Mail::Box::MH::Resource - Manage an MH resource file such as the MH profile

#Create object and load profile
my $prof = Mail::Box::MH::Resource->new();
#Get a list of the profile components
my @keys = $prof->enum();
#Get MH directory to pass to Mail::Box::Manager
my $folderdir = $prof->get('Path');
$folderdir = File::Spec->file_name_is_absolute($folderdir->{Path}) ?
$folderdir->{Path} :
File::Spec->catfile($ENV{HOME}, $folderdir->{Path})
#Permanently remove messages
$prof->set('rmmproc'=>'rm');
#Save changes
$prof->close();

Read and write MH format resource files such as profile, context, and sequence.

Open a resource file, accepts an optional filename of the resource file to open. Non-absolute filenames which do not start with your system's designation for the current directory are opened relative to the MH profile Path component. ./ should work on most right minded systems, : for Macintosh, see File::Spec if you don't what it is for your system. If unspecified new falls back to $ENV{MH} and then $HOME/.mh_profile.
Example:
#Create a new profile
my $prof = Mail::Box::MH::Resource->new('/tmp/.mh_profile');
#Load the context file to determine the currently selected folder
my $cntx = Mail::Box::MH::Resource->new('current');
Returns a list of existing component names.
Return the values of one or more components. See "SYNOPSIS" for an example.
Set the values of one or more components. See "SYNOPSIS" for an example.
Write the resource file to disk, original component ordering is not preserved.

Order is not preserved therefore "comments" may end up misplaced.


Jerrad Pierce <jpierce@cpan.org>