[Templates-cvs] cvs commit: TT3/lib/Template/TT3 Document.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
Mon, 15 Dec 2003 17:33:58 +0000
cvs 03/12/15 17:33:58
Modified: lib/Template/TT3 Document.pm
Log:
* fixed line number reporting in debug
Revision Changes Path
1.5 +5 -5 TT3/lib/Template/TT3/Document.pm
Index: Document.pm
===================================================================
RCS file: /template-toolkit/TT3/lib/Template/TT3/Document.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Document.pm 2003/12/15 15:35:11 1.4
+++ Document.pm 2003/12/15 17:33:58 1.5
@@ -18,7 +18,7 @@
# modify it under the same terms as Perl itself.
#
# REVISION
-# $Id: Document.pm,v 1.4 2003/12/15 15:35:11 abw Exp $
+# $Id: Document.pm,v 1.5 2003/12/15 17:33:58 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.4 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/);
$DEBUG = 0 unless defined $DEBUG;
$ERROR = '';
@@ -86,7 +86,7 @@
sub tag {
my ($self, $text) = @_;
my $textref = ref $text ? $text : \$text;
- $self->debug("tag at line $self->{ line } [$$textref]\n") if $DEBUG;
+ $self->debug("tag at line ", $self->line(), " [$$textref]\n") if $DEBUG;
my $tagdir = [ TAG, $textref, $self->position() ];
push(@{ $self->{ body } }, $tagdir);
@@ -104,7 +104,7 @@
sub text {
my ($self, $text) = @_;
my $textref = ref $text ? $text : \$text;
-# $self->debug("text at line $self->{ line } [$$textref]\n") if $DEBUG;
+ $self->debug("text at line ", $self->line(), " [$$textref]\n") if $DEBUG;
# for debugging
my $posn = $self->position();
@@ -379,7 +379,7 @@
=head1 VERSION
-$Revision: 1.4 $
+$Revision: 1.5 $
=head1 COPYRIGHT