[Templates-cvs] cvs commit: TT3/lib/Template Factory.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
Fri, 10 Dec 2004 12:12:34 +0000
cvs 04/12/10 12:12:34
Modified: lib/Template Factory.pm
Log:
* allow object or class methods
Revision Changes Path
1.2 +4 -4 TT3/lib/Template/Factory.pm
Index: Factory.pm
===================================================================
RCS file: /template-toolkit/TT3/lib/Template/Factory.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Factory.pm 2004/12/10 10:44:38 1.1
+++ Factory.pm 2004/12/10 12:12:34 1.2
@@ -18,7 +18,7 @@
# modify it under the same terms as Perl itself.
#
# REVISION
-# $Id: Factory.pm,v 1.1 2004/12/10 10:44:38 abw Exp $
+# $Id: Factory.pm,v 1.2 2004/12/10 12:12:34 abw Exp $
#
#========================================================================
@@ -30,7 +30,7 @@
use Template::Base;
use base qw( Template::Base );
-our $VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);
+our $VERSION = sprintf("%d.%02d", q$Revision: 1.2 $ =~ /(\d+)\.(\d+)/);
our $DEBUG = 0 unless defined $DEBUG;
our $ERROR = '';
our $THROW = 'factory'; # name used for throwing errors
@@ -141,7 +141,7 @@
sub config {
my $self = shift;
- my $config = $self->{ config };
+ my $config = ref $self ? $self->{ config } : { };
# return entire hash if no name argument provided
return $config unless @_;
@@ -445,7 +445,7 @@
=head1 VERSION
-$Revision: 1.1 $
+$Revision: 1.2 $
=head1 COPYRIGHT