diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-02-25 03:31:40 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-02-25 03:31:40 -0600 |
commit | 9052192354aceab90a49f26b4c3fc1db2428c027 (patch) | |
tree | e6a26daf77acfbe9c91b67c781860b8109362c85 | |
parent | 077f578b9674ec9e8b9fa38b8384b2bcad12236b (diff) | |
download | app-ttyrec-9052192354aceab90a49f26b4c3fc1db2428c027.tar.gz app-ttyrec-9052192354aceab90a49f26b4c3fc1db2428c027.zip |
enable appending
-rw-r--r-- | lib/App/Ttyrec.pm | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/App/Ttyrec.pm b/lib/App/Ttyrec.pm index ff9f8d9..305ee8d 100644 --- a/lib/App/Ttyrec.pm +++ b/lib/App/Ttyrec.pm @@ -21,7 +21,10 @@ has ttyrec => ( is => 'ro', isa => 'FileHandle', lazy => 1, - default => sub { Tie::Handle::TtyRec->new(shift->ttyrec_file) }, + default => sub { + my $self = shift; + Tie::Handle::TtyRec->new($self->ttyrec_file, append => $self->append) + }, ); has term => ( @@ -47,13 +50,6 @@ has term => ( handles => ['run'], ); -sub BUILD { - my $self = shift; - - die "Appending is not currently supported" - if $self->append; -} - __PACKAGE__->meta->make_immutable; no Moose; |