=================================================================== RCS file: /cvs/todotxt/Text-Todo/lib/Text/Todo.pm,v retrieving revision 1.17 retrieving revision 1.24 diff -u -r1.17 -r1.24 --- todotxt/Text-Todo/lib/Text/Todo.pm 2010/01/12 20:09:02 1.17 +++ todotxt/Text-Todo/lib/Text/Todo.pm 2010/01/22 18:15:06 1.24 @@ -1,6 +1,6 @@ package Text::Todo; -# $AFresh1: Todo.pm,v 1.16 2010/01/12 19:40:52 andrew Exp $ +# $AFresh1: Todo.pm,v 1.23 2010/01/22 01:30:45 andrew Exp $ use warnings; use strict; @@ -10,14 +10,17 @@ use Text::Todo::Entry; use File::Spec; -use version; our $VERSION = qv('0.0.1'); +use version; our $VERSION = qv('0.1.1'); { - my %path_of; - my %list_of; - my %loaded_of; + my @attr_refs = \( + my %path_of, + my %list_of, + my %loaded_of, + ); + sub new { my ( $class, $options ) = @_; @@ -382,6 +385,17 @@ croak "Invalid entry [$entry]!"; } + + sub DESTROY { + my ($self) = @_; + my $ident = ident $self; + + foreach my $attr_ref (@attr_refs) { + delete $attr_ref->{$ident}; + } + + return; + } } 1; # Magic true value required at end of module @@ -389,7 +403,7 @@ =head1 NAME -Text::Todo - Perl interface to todo_txt files +Text::Todo - Perl interface to todotxt files =head1 VERSION @@ -397,7 +411,7 @@ Since the $VERSION can't be automatically included, here is the RCS Id instead, you'll have to look up $VERSION. - $Id: Todo.pm,v 1.17 2010/01/12 20:09:02 andrew Exp $ + $Id: Todo.pm,v 1.24 2010/01/22 18:15:06 andrew Exp $ =head1 SYNOPSIS