View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Florent Angly > Bio-Community-0.001000 > Bio::Community::Role::Locked



Annotate this POD


View/Report Bugs
Source   Latest Release: Bio-Community-0.001008


Bio::Community::Role::Locked - Role for objects that can be locked (made read-only)


  package My::Package;

  use Moose;
  with 'Bio::Community::Role::Locked';

  # Use the lock() and unlock() methods as needed
  # ...



This role provides the capability to make objects of the class that consumes this role read-only. The lock() method can be invoked to make an object read-only, while unlock() restores the read/write properties of the object. If you try to call a method to modify an object that is locked or otherwise attempt to change its hash, you will get an error similar to this:

 Modification of a read-only value attempted at accessor Bio::Community::Member::foo


Florent Angly


User feedback is an integral part of the evolution of this and other Bioperl modules. Please direct usage questions or support issues to the mailing list,, rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

If you have found a bug, please report it on the BioPerl bug tracking system to help us keep track the bugs and their resolution:


Copyright 2011,2012,2013 by the BioPerl Team

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.


The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _


 Usage   : $member->lock();
 Function: Lock the object, making it read-only.
 Args    : None
 Returns : 1 for success


 Usage   : $member->unlock();
 Function: Unlock the object, restoring its read and write properties.
 Args    : None
 Returns : 1 for success
syntax highlighting: