Tie::Handle::TtyRec - write a ttyrec
use Tie::Handle::TtyRec; my $handle = Tie::Handle::TtyRec->new("foo.ttyrec"); print $handle "hello", "world";
A ttyrec is a format used for recording terminal sessions. Notably, practically all NetHack games are recorded using ttyrecs. ttyrecs include precise timing data and can be a little fiddly. This module lets you focus on your application, instead of making sure your ttyrec headers are perfect.
The usual way to use this module is through its new interface. It will clobber the file you decide to record to, unless you pass append => 1 as additional arguments to new.
new
append => 1
Each argument to print will be put into its own ttyrec frame, using the current time. So, the following will create three separate frames,
print $handle "foo", "bar", "baz";
The following will create only one frame,
print $handle "foo" . "bar" . "baz";
Term::TtyRec, Term::TtyRec::Plus
Shawn M Moore, sartak@gmail.com
sartak@gmail.com
Jesse Luehrs, doy@tozt.net
doy@tozt.net
Copyright 2007-2012 Shawn M Moore.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Tie::Handle::TtyRec, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tie::Handle::TtyRec
CPAN shell
perl -MCPAN -e shell install Tie::Handle::TtyRec
For more information on module installation, please visit the detailed CPAN module installation guide.