Locking and Mail::Box::Manager

View: New views
1 Messages — Rating Filter:   Alert me  

Locking and Mail::Box::Manager

by James Oliver :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've read about Mail::Box::Locker[0] and on this page the synopsis is:

   use Mail::Box;
   my $folder = Mail::Box->new(lock_method => 'DOTLOCK');
   print $folder->locker->type;


On [1] it is written that the Mail::Box::Manager creates Mail::Box
objects. How can I specify the locking method when I use
Mail::Box::Manager? Locking is not mentioned on [1].

example:
    my $manager = Mail::Box::Manager->new;
    my $mailbox = $manager->open("$mailboxname", access => 'rw', type
=> 'mbox', create => 1);


Is it sufficient to write

    my $mailbox = $manager->open("$mailboxname", access => 'rw', type
=> 'mbox', create => 1, lock_method => 'DOTLOCK');

Thanks for your help,
James



[0] http://search.cpan.org/~markov/Mail-Box-2.065/lib/Mail/Box/Locker.pod
[1] http://search.cpan.org/~markov/Mail-Box-2.065/lib/Mail/Box.pod

LightInTheBox - Buy quality products at wholesale price!