[Templates-cvs] cvs commit: TT3/lib/Template/TT3 Document.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
Tue, 16 Dec 2003 12:43:39 +0000
cvs 03/12/16 12:43:39
Modified: lib/Template/TT3 Document.pm
Log:
* changed text() and tag() methods to return self
Revision Changes Path
1.6 +7 -9 TT3/lib/Template/TT3/Document.pm
Index: Document.pm
===================================================================
RCS file: /template-toolkit/TT3/lib/Template/TT3/Document.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Document.pm 2003/12/15 17:33:58 1.5
+++ Document.pm 2003/12/16 12:43:39 1.6
@@ -18,7 +18,7 @@
# modify it under the same terms as Perl itself.
#
# REVISION
-# $Id: Document.pm,v 1.5 2003/12/15 17:33:58 abw Exp $
+# $Id: Document.pm,v 1.6 2003/12/16 12:43:39 abw Exp $
#
#========================================================================
@@ -31,7 +31,7 @@
use vars qw( $VERSION $DEBUG $ERROR $WARNING $TAGS );
use base qw( Template::TT3::Base );
-$VERSION = sprintf("%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/);
$DEBUG = 0 unless defined $DEBUG;
$ERROR = '';
@@ -91,7 +91,7 @@
my $tagdir = [ TAG, $textref, $self->position() ];
push(@{ $self->{ body } }, $tagdir);
- return $tagdir;
+ return $self;
}
@@ -121,15 +121,13 @@
$self->debug("post-chomped text [$$textref]\n") if $DEBUG;
}
+ # don't both adding empty strings
if (length $$textref) {
my $textdir = [ TEXT, $textref, $posn ];
push(@{ $self->{ body } }, $textdir);
- return $textdir;
- }
- else {
- # don't both adding empty strings
- return 1;
}
+
+ return $self;
}
@@ -379,7 +377,7 @@
=head1 VERSION
-$Revision: 1.5 $
+$Revision: 1.6 $
=head1 COPYRIGHT