[Templates-cvs] cvs commit: TT3/lib/Template/TT3/Tag Comment.pm Directive.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
Tue, 16 Dec 2003 12:42:23 +0000
cvs 03/12/16 12:42:23
Modified: lib/Template/TT3/Tag Comment.pm Directive.pm
Log:
* changed to return $document
Revision Changes Path
1.3 +4 -5 TT3/lib/Template/TT3/Tag/Comment.pm
Index: Comment.pm
===================================================================
RCS file: /template-toolkit/TT3/lib/Template/TT3/Tag/Comment.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Comment.pm 2003/12/15 17:33:10 1.2
+++ Comment.pm 2003/12/16 12:42:23 1.3
@@ -17,7 +17,7 @@
# modify it under the same terms as Perl itself.
#
# REVISION
-# $Id: Comment.pm,v 1.2 2003/12/15 17:33:10 abw Exp $
+# $Id: Comment.pm,v 1.3 2003/12/16 12:42:23 abw Exp $
#
#========================================================================
@@ -29,7 +29,7 @@
use vars qw( $VERSION $DEBUG $ERROR $WARNING $TAG );
use base qw( Template::TT3::Tag );
-$VERSION = sprintf("%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/);
$DEBUG = 0 unless defined $DEBUG;
$ERROR = '';
$TAG = {
@@ -41,9 +41,8 @@
sub scan {
my ($self, $textref, $document, $start) = @_;
-
$self->debug("scanned comment: $$textref\n") if $DEBUG;
- return 1;
+ return $document;
}
@@ -76,7 +75,7 @@
=head1 VERSION
-$Revision: 1.2 $
+$Revision: 1.3 $
=head1 COPYRIGHT
1.4 +9 -7 TT3/lib/Template/TT3/Tag/Directive.pm
Index: Directive.pm
===================================================================
RCS file: /template-toolkit/TT3/lib/Template/TT3/Tag/Directive.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Directive.pm 2003/12/15 17:32:36 1.3
+++ Directive.pm 2003/12/16 12:42:23 1.4
@@ -17,7 +17,7 @@
# modify it under the same terms as Perl itself.
#
# REVISION
-# $Id: Directive.pm,v 1.3 2003/12/15 17:32:36 abw Exp $
+# $Id: Directive.pm,v 1.4 2003/12/16 12:42:23 abw Exp $
#
#========================================================================
@@ -30,7 +30,7 @@
use vars qw( $VERSION $DEBUG $ERROR $WARNING $TAG );
use base qw( Template::TT3::Tag );
-$VERSION = sprintf("%d.%02d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/);
+$VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/);
$DEBUG = 0 unless defined $DEBUG;
$ERROR = '';
$TAG = {
@@ -43,7 +43,7 @@
sub scan {
my ($self, $textref, $document, $start) = @_;
- my ($flag, $comment, $result);
+ my ($flag, $comment);
$self->debug("parsing directive\n") if $DEBUG;
@@ -74,8 +74,10 @@
# - - - - - - - - - - - - - - - - - - - - - - - - - -
# here's where we do something interesting...
- $result = $comment || $document->tag($textref)
- || $self->error($document->error());
+ unless ($comment) {
+ $document = $document->tag($textref)
+ || $self->error($document->error());
+ }
# - - - - - - - - - - - - - - - - - - - - - - - - - -
# examine closing flag and post_chomp options
@@ -91,7 +93,7 @@
$document->post_chomp(CHOMP_ALL);
}
- return $result;
+ return $document;
}
@@ -124,7 +126,7 @@
=head1 VERSION
-$Revision: 1.3 $
+$Revision: 1.4 $
=head1 COPYRIGHT