NetSDS...Struct(3pm)
π NetSDS::Util::Struct β the manual, but make it cute π
okay bestie so this page you're reading? it's the manual for NetSDS::Util::Struct, filed under the manual name NetSDS...Struct(3pm) β yes that's really how it's spelled up top, the name got chopped, that's just the vibe, don't @ me. πΈ
β¨ NAME β¨
NetSDS::Util::Struct β data structure convertors π¦
π SYNOPSIS π
use NetSDS::Util::Struct;
...
my $str = dump_to_row($some_structure);
that's it, that's the whole entrance exam π
π DESCRIPTION π
the NetSDS::Util::Struct module is literally just a little grab-bag of different utilities for data structures processing. it's giving toolbox energy. π§°β¨
π EXPORTED METHODS π
dump_to_string(...)β Returns cleaned dump to scalar. π«Άdump_to_row(...)β Returns cleaned dump to scalar. (yes, same one-liner as the one above, no cap, that's what the manual says π)to_array($data)β that's the whole thing, bestie. no description was ever written for this one. it exists, it takes$data, and that's all we know. iconic mystery honestly πarrays_to_hash($keys_ref, $values_ref)β translate arrays to hash. πΈ
Parameters: references to keys array and values array.
Return: hash.
Now the important bits, pay attention bestie:
- If
@$keys_refis longer than@$values_refβ the rest of keys filled with"undef"values. π - If
@$keys_refis shorter than@$values_refβ the rest of values are discarded. π - If any of parameters isn't array reference then
"undef"will return. π«
Example:
my %h = array2hash(['fruit','animal'], ['apple','horse']);
Result should be a hash:
(
fruit => 'apple',
animal => 'horse'
)
merge_hash($target, $source)β merge two hashes. π
Parameters: references to target and source hashes.
This method adds source hash to target one and return value as a result. π
π EXAMPLES π
None
not a single one. we're on our own out here fr fr π
π¦ BUGS π¦
Unknown yet
unknown yet, bestie. they're out there. lurking. lowkey ominous ngl π
β TODO β
None
π SEE ALSO π
None
no friends, no cross-references, no nothing. this module is on its main character solo arc π
π AUTHORS π
Valentyn Solomko <pere@pere.org.ua>
and that's the whole page, babe π«Ά this one shipped with perl v5.36.0, dated 2022-11-20, and the manual name stamped on it is NetSDS...Struct(3pm). go forth and convert your data structures, you absolute legend β¨πΈπ
π¦ where this page comes from
- debian bookworm: libnetsds-util-perl 1.045-2 Β· GPL-2.0-or-later
- debian trixie: libnetsds-util-perl 1.045-2 Β· GPL-2.0-or-later
- ubuntu noble: libnetsds-util-perl 1.045-2 Β· GPL-2.0-or-later
- ubuntu questing: libnetsds-util-perl 1.045-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms