[Templates-cvs] cvs commit: TT3/lib Template.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
Fri, 10 Dec 2004 18:50:14 +0000
cvs 04/12/10 18:50:13
Modified: lib Template.pm
Log:
* allow text or textref in output() (for now)
Revision Changes Path
1.2 +4 -3 TT3/lib/Template.pm
Index: Template.pm
===================================================================
RCS file: /template-toolkit/TT3/lib/Template.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Template.pm 2004/12/10 15:05:21 1.1
+++ Template.pm 2004/12/10 18:50:13 1.2
@@ -15,7 +15,7 @@
# modify it under the same terms as Perl itself.
#
# REVISION
-# $Id: Template.pm,v 1.1 2004/12/10 15:05:21 abw Exp $
+# $Id: Template.pm,v 1.2 2004/12/10 18:50:13 abw Exp $
#
#========================================================================
@@ -85,8 +85,9 @@
sub output {
- my ($self, $textref, $output) = splice(@_, 0, 3);
+ my ($self, $text, $output) = splice(@_, 0, 3);
my $opts = @_ == 1 && UNIVERSAL::isa($_[0], 'HASH') ? shift : { @_ };
+ my $textref = ref $text ? $text : \$text;
$output ||= $self->{ output };
@@ -155,7 +156,7 @@
=head1 VERSION
-$Revision: 1.1 $
+$Revision: 1.2 $
=head1 COPYRIGHT