Vnlog::Parser(3pm)
β¨ NAME β¨
Vnlog::Parser β a whole lil library that parses vnlog data, and honestly? it's giving simple. bestie, this is the Vnlog::Parser page from the vnlog manual, and we're gonna go through it together π
πΈ SYNOPSIS πΈ
okay so here's the whole vibe in code, no notes:
use Vnlog::Parser;
my $parser = Vnlog::Parser->new();
while (<DATA>)
{
if( !$parser->parse($_) )
{
die "Error parsing vnlog line '$_': " . $parser->error();
}
my $d = $parser->getValuesHash();
next unless %$d;
say "$d->{time}: $d->{height}";
}
likeβ¦ that's it. that's the whole thing. iconic π
π¦ DESCRIPTION π¦
so this is a simple perl script that parses vnlog input and makes the incoming key/values available to you. the example up there? that's representative of normal use, fr fr. lowkey all you need.
the API functions are:
new()β creates a newVnlog::Parserobject. takes no arguments, she simply exists πparse(line)β the method you call for each input line. on error, a false value is returned. so like, check it, bestie.error()β if an error occurred, this returns a string that describes the error. your emotional support error message π«ΆgetKeys()β returns a list-ref containing the current column labels, orundefif this hasn't been parsed yet. no keys yet?undef. that's just where we're at.getValues()β returns a list-ref containing the values for the current line, orundefif there aren't any. and listen: that's not necessarily an error, because the line could've been a comment. empty fields are'-'in the vnlog andundefin the values returned here. periodt.getValuesHash()β returns a hash-ref containing the key-value mapping for the current line, orundefif there's no data in this line. again, not necessarily an error β this line could have been a comment. empty fields are'-'in the vnlog andundefin the values returned here. same energy as above, different data structure π
yes the original list really does end with an empty bullet. she's mysterious. she's a blank. we respect her π«‘π
π₯ REPOSITORY π₯
the source lives at <https://github.com/dkogan/vnlog> β go look, go star it, go vibe check it β
π AUTHOR π
Dima Kogan, "<dima@secretsauce.net>" β the main character who wrote this π
π LICENSE AND COPYRIGHT π
Copyright 2016 California Institute of Technology.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
like yes, go ahead and redistribute and/or modify it, just keep the LGPL terms, okay? read the license, it's right there π§
and that's the whole page, bestie!! πΈβ¨ this was Vnlog::Parser(3pm) from the vnlog manual, dated 2026-01-26 β love that for us. mwah π
π
π¦ where this page comes from
- ubuntu resolute: libvnlog-perl 1.42-1 Β· LGPL-2.1-or-later
- ubuntu stonking: libvnlog-perl 1.42-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms