Parse::DMIDecode::Handle3pm
Smbios structure handle object class
Usage
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||'')));}}
Overview
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.
Version
$Id: Handle.pm 976 2007-03-04 20:47:36Z nicolaw $
Releases
8 releases since Debian 6.0 (Squeeze); the text changed 3 times.