NetHack::Logfile - Parse and create NetHack logfiles
version 1.00
use NetHack::Logfile ':all'; my @entries = read_logfile("logfile"); @entries = sort { $b->score <=> $a->score } @entries; splice(@entries, 2000); write_logfile(\@entries, "high-scores"); say $entries[0]->as_line;
This module provides an easy way to read NetHack logfiles. You can also create logfiles.
This module's interface changed drastically from 0.01 to 1.00.
0.01
1.00
Currently, NetHack versions 3.2.0 through 3.4.3 are supported. If you desire support for an older version, please open up a ticket on rt.cpan.org with some logfile entries for these older versions.
Takes a file (default name: logfile) and parses it as a logfile. If any IO error occurs in reading the file, an exception is thrown. If any error occurs in parsing a logline, an exception is thrown.
This returns entries of class NetHack::Logfile::Entry. See that module for more information.
Shortcut for "new_from_line" in NetHack::Logfile::Entry.
Takes an arrayref of NetHack::Logfile::Entry objects and a filename (default name: logfile). If any IO error occurs, it will throw an exception.
Returns no useful value.
Shawn M Moore, sartak@gmail.com
sartak@gmail.com
To install NetHack::Logfile, copy and paste the appropriate command in to your terminal.
cpanm
cpanm NetHack::Logfile
CPAN shell
perl -MCPAN -e shell install NetHack::Logfile
For more information on module installation, please visit the detailed CPAN module installation guide.