Parse:...Handle(3pm)
π NAME π
okay bestie so this is Parse::DMIDecode::Handle β the SMBIOS Structure Handle Object Class. that's the whole name, she's a whole class fr π
β¨ SYNOPSIS β¨
the vibe check, in code:
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||''))
);
}
}
(yes Contians is spelled like that in the source bestie, we don't touch the code, no cap π«Ά)
π¦ DESCRIPTION π¦
this section is empty in the original. literally nothing here. iconic minimalism, she said nothing and left πΈ
π METHODS π
π new
creates a brand new structure handle object for you. you don't really call this yourself β it's called by Parse::DMIDecode's parse() method, and indirectly by its probe() method. it's giving behind-the-scenes main character energy π
π raw
my $raw_data = $handle->raw;
hands you back the raw data as generated by dmidecode β the exact stuff that got parsed to build this handle object in the first place. the receipts, basically π§Ύ
πΈ bytes
my $bytes = $handle->bytes;
π address
my $address = $handle->address;
returns the address handle of the structure. so like, where she lives π
β handle
alias for address. same girl, different name β¨
π dmitype
my $dmitype = $handle->dmitype;
π¦ type
alias for dmitype. again β same energy, second name π«
π description
my $description = $handle->description;
π keywords
my @keywords = $handle->keywords;
returns a list of keyword data pairs you can retrieve out of this handle object. the lil menu of what's available π
π«Ά 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. so cute, so useful β
β οΈ but use this one with care bestie!! it's a cloned copy of the parsed data structures that the Parse::DMIDecode::Handle object uses internally, and because of that the format may change in later releases without notice. no promises, no warnings, she's unpredictable like that π
π₯ SEE ALSO π₯
Parse::DMIDecode
π VERSION π
$Id: Handle.pm 976 2007-03-04 20:47:36Z nicolaw $
πΈ AUTHOR πΈ
Nicola Worthington <nicolaw@cpan.org>
and 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.
<http://www.apache.org/licenses/LICENSE-2.0>
and that's the whole page bestie, mwah π this one came out of perl v5.36.0, dated 2022-10-13, and it lives under Parse::...Handle(3pm) in the User Contributed Perl Documentation section. slay, periodt ππ
π¦ where this page comes from
- ubuntu noble: libparse-dmidecode-perl 0.03-4 Β· Apache-2.0
- ubuntu resolute: libparse-dmidecode-perl 0.03-4 Β· Apache-2.0
- ubuntu stonking: libparse-dmidecode-perl 0.03-4 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms