ManaTools::Shared::PropertiesRole - a Properties Moose::Role
with 'ManaTools::Shared::PropertiesRole'; 1; ... my $f = Foo->new(); my @props = $f->properties(); my $vendor = $f->prop('vendor'); $f->prop('vendor', 'myself'); $f->remove('vendor'); $f->prop_from_file('vendor', '/sys/bus/scsi/2:0:0:0/vendor');
This Role is a collection of Properties
You can find documentation for this Role with the perldoc command: perldoc ManaTools::Shared::PropertiesRole
Maarten Vanraes <alien@rmail.be>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
array of string
DESCRIPTION
this method returns a list of Property keys
$key: string
OUTPUT
1 if Property is assigned, 0 otherwise
DESCRIPTION
this method checks if it has the properties assigned
$key: string $value: optional value to set
OUTPUT
value of the Property
DESCRIPTION
this method gets the value of a Property and optionally sets it
$key: string $file: file with value to set
OUTPUT
value of the Property, or undef if failed
DESCRIPTION
this method sets the value of a Property from a file and returns the value
$key: string
DESCRIPTION
this method removes a property