NAME
Parse::DMIDecode::Handle - SMBIOS Structure Handle Object Class
SYNOPSIS
use Parse::DMIDecode qw();
my $decoder = new Parse::DMIDecode;
$decoder->probe;
for my $handle ($decoder->get_handles) {
printf("Handle %s of type %s is %s bytes long (minus strings).\n".
" > Contians the following keyword data entries:\n",
$handle->handle,
$handle->dmitype,
$handle->bytes
);
for my $keyword ($handle->keywords) {
my $value = $handle->keyword($keyword);
printf("Keyword \"%s\" => \"%s\"\n",
$keyword,
(ref($value) eq 'ARRAY' ?
join(', ',@{$value}) : ($value||''))
);
}
}
DESCRIPTION
METHODS
new
Create a new struture handle object. This is called by Parse::DMIDecode's parse() (and indirectly by probe()) methods.
raw
my $raw_data = $handle->raw;
Returns the raw data as generated by dmidecode that was parsed to create this handle object.
bytes
my $bytes = $handle->bytes;
address
my $address = $handle->address;
Returns the address handle of the structure.
handle
Alias for address.
dmitype
my $dmitype = $handle->dmitype;
type
Alias for dmitype.
description
my $description = $handle->description;
keywords
my @keywords = $handle->keywords;
Returns a list of keyword data pairs available for retreival from this handle object.
keyword
for my $keyword ($handle->keywords) {
printf("Keyword \"%s\" => \"%s\"\n",
$keyword,
$handle->keyword($keyword)
);
}
parsed_structures
use Data::Dumper;
my $ref = $handle->parsed_structures;
print Dumper($ref);
Returns a copy of the parsed structures. This should be used with care as this is a cloned copy of the parsed data structures that the Parse::DMIDecode::Handle object uses internally, and as such may change format in later releases without notice.
SEE ALSO
VERSION
$Id: Handle.pm 976 2007-03-04 20:47:36Z nicolaw $
AUTHOR
Nicola Worthington <nicolaw@cpan.org>
If you like this software, why not show your appreciation by sending the author something nice from her Amazon wishlist? ( http://www.amazon.co.uk/gp/registry/1VZXC59ESWYK0?sort=priority )
COPYRIGHT
Copyright 2006 Nicola Worthington.
This software is licensed under The Apache Software License, Version 2.0.