=================================================================== RCS file: /cvs/todotxt/Text-Todo/lib/Text/Todo/Entry.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- todotxt/Text-Todo/lib/Text/Todo/Entry.pm 2010/01/08 04:50:41 1.8 +++ todotxt/Text-Todo/lib/Text/Todo/Entry.pm 2010/01/08 17:41:56 1.9 @@ -1,6 +1,6 @@ package Text::Todo::Entry; -# $RedRiver: Entry.pm,v 1.7 2009/07/13 18:05:50 andrew Exp $ +# $RedRiver: Entry.pm,v 1.8 2010/01/08 04:50:41 andrew Exp $ use warnings; use strict; @@ -47,14 +47,8 @@ } # Aliases - sub app { append(@_) } sub change { _update_entry(@_) } sub depri { _set_priority( @_, '' ) } - sub do { complete(@_) } - sub done { completed(@_) } - sub dp { depri(@_) } - sub p { priority(@_) } - sub prep { prepend(@_) } sub pri { priority(@_) } sub replace { _update_entry(@_) } @@ -132,13 +126,6 @@ return $priority_of{$ident}; } - sub completed { - my ($self) = @_; - my $ident = ident($self); - - return $completion_status_of{$ident}; - } - sub prepend { my ( $self, $addition ) = @_; @@ -147,8 +134,8 @@ $new =~ s/$priority_completion_regex//xms; - if ( $self->completed ) { - push @new, $self->completed; + if ( $self->done) { + push @new, $self->done; } if ( $self->priority ) { @@ -167,11 +154,11 @@ return $self->_update_entry( join q{ }, $self->text, $addition ); } - sub complete { + sub do { my ($self) = @_; my $ident = ident($self); - if ( $self->completed ) { + if ( $self->done) { return 1; } @@ -180,6 +167,13 @@ return $self->prepend(); } + sub done { + my ($self) = @_; + my $ident = ident($self); + + return $completion_status_of{$ident}; + } + } 1; # Magic true value required at end of module __END__ @@ -239,9 +233,9 @@ =head2 append -=head2 complete +=head2 do -=head2 completed +=head2 done =head1 DIAGNOSTICS