[BACK]Return to Entry.pm CVS log [TXT][DIR] Up to [local] / todotxt / Text-Todo / lib / Text / Todo

Diff for /todotxt/Text-Todo/lib/Text/Todo/Entry.pm between version 1.8 and 1.9

version 1.8, 2010/01/08 04:50:41 version 1.9, 2010/01/08 17:41:56
Line 1 
Line 1 
 package Text::Todo::Entry;  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 warnings;
 use strict;  use strict;
Line 47 
Line 47 
     }      }
   
     # Aliases      # Aliases
     sub app     { append(@_) }  
     sub change  { _update_entry(@_) }      sub change  { _update_entry(@_) }
     sub depri   { _set_priority( @_, '' ) }      sub depri   { _set_priority( @_, '' ) }
     sub do      { complete(@_) }  
     sub done    { completed(@_) }  
     sub dp      { depri(@_) }  
     sub p       { priority(@_) }  
     sub prep    { prepend(@_) }  
     sub pri     { priority(@_) }      sub pri     { priority(@_) }
     sub replace { _update_entry(@_) }      sub replace { _update_entry(@_) }
   
Line 132 
Line 126 
         return $priority_of{$ident};          return $priority_of{$ident};
     }      }
   
     sub completed {  
         my ($self) = @_;  
         my $ident = ident($self);  
   
         return $completion_status_of{$ident};  
     }  
   
     sub prepend {      sub prepend {
         my ( $self, $addition ) = @_;          my ( $self, $addition ) = @_;
   
Line 147 
Line 134 
   
         $new =~ s/$priority_completion_regex//xms;          $new =~ s/$priority_completion_regex//xms;
   
         if ( $self->completed ) {          if ( $self->done) {
             push @new, $self->completed;              push @new, $self->done;
         }          }
   
         if ( $self->priority ) {          if ( $self->priority ) {
Line 167 
Line 154 
         return $self->_update_entry( join q{ }, $self->text, $addition );          return $self->_update_entry( join q{ }, $self->text, $addition );
     }      }
   
     sub complete {      sub do {
         my ($self) = @_;          my ($self) = @_;
         my $ident = ident($self);          my $ident = ident($self);
   
         if ( $self->completed ) {          if ( $self->done) {
             return 1;              return 1;
         }          }
   
Line 180 
Line 167 
         return $self->prepend();          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  1;    # Magic true value required at end of module
 __END__  __END__
Line 239 
Line 233 
   
 =head2 append  =head2 append
   
 =head2 complete  =head2 do
   
 =head2 completed  =head2 done
   
   
 =head1 DIAGNOSTICS  =head1 DIAGNOSTICS

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>