[Templates-cvs] cvs commit: TT3/lib/Template Factory.pm
cvs@template-toolkit.org
cvs@template-toolkit.org
Sun, 12 Dec 2004 10:39:32 +0000
cvs 04/12/12 10:39:32
Modified: lib/Template Factory.pm
Log:
* allow default => 0 option to disable default
Revision Changes Path
1.7 +5 -5 TT3/lib/Template/Factory.pm
Index: Factory.pm
===================================================================
RCS file: /template-toolkit/TT3/lib/Template/Factory.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Factory.pm 2004/12/12 10:27:38 1.6
+++ Factory.pm 2004/12/12 10:39:32 1.7
@@ -18,7 +18,7 @@
# modify it under the same terms as Perl itself.
#
# REVISION
-# $Id: Factory.pm,v 1.6 2004/12/12 10:27:38 abw Exp $
+# $Id: Factory.pm,v 1.7 2004/12/12 10:39:32 abw Exp $
#
#========================================================================
@@ -30,7 +30,7 @@
use Template::Base;
use base qw( Template::Base );
-our $VERSION = sprintf("%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/);
+our $VERSION = sprintf("%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/);
our $DEBUG = 0 unless defined $DEBUG;
our $ERROR = '';
our $THROW = 'factory'; # name used for throwing errors
@@ -80,8 +80,8 @@
}
# default option can be set to provide default module name
- my $default = $config->{ default }
- || $self->pkgvar( DEFAULT => $DEFAULT );
+ my $default = $config->{ default };
+ $default = $self->pkgvar( DEFAULT => $DEFAULT ) unless defined $default;
$self->default($default) if $default;
@@ -502,7 +502,7 @@
=head1 VERSION
-$Revision: 1.6 $
+$Revision: 1.7 $
=head1 COPYRIGHT