| NetHack-Logfile documentation | view source | Contained in the NetHack-Logfile distribution. |
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.
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
| NetHack-Logfile documentation | view source | Contained in the NetHack-Logfile distribution. |