From 9052192354aceab90a49f26b4c3fc1db2428c027 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 25 Feb 2012 03:31:40 -0600 Subject: enable appending --- lib/App/Ttyrec.pm | 12 ++++-------- 1 file 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; -- cgit v1.2.3