[Templates-cvs] cvs commit: TT3/lib/Template Base.pm

cvs@template-toolkit.org cvs@template-toolkit.org
Tue, 07 Dec 2004 11:00:05 +0000


cvs         04/12/07 11:00:05

  Modified:    lib/Template Base.pm
  Log:
  * changed error() to look for THROW via pkgvar() to allow for inheritance
  
  Revision  Changes    Path
  1.12      +5 -5      TT3/lib/Template/Base.pm
  
  Index: Base.pm
  ===================================================================
  RCS file: /template-toolkit/TT3/lib/Template/Base.pm,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Base.pm	2004/12/03 10:05:26	1.11
  +++ Base.pm	2004/12/07 11:00:05	1.12
  @@ -16,7 +16,7 @@
   #   modify it under the same terms as Perl itself.
   #
   # REVISION
  -#   $Id: Base.pm,v 1.11 2004/12/03 10:05:26 abw Exp $
  +#   $Id: Base.pm,v 1.12 2004/12/07 11:00:05 abw Exp $
   #
   #========================================================================
   
  @@ -29,7 +29,7 @@
   require Template::Utils;
   require Template::Exception;
   
  -our $VERSION   = sprintf("%d.%02d", q$Revision: 1.11 $ =~ /(\d+)\.(\d+)/);
  +our $VERSION   = sprintf("%d.%02d", q$Revision: 1.12 $ =~ /(\d+)\.(\d+)/);
   our $DEBUG     = 0 unless defined $DEBUG;
   our $ERROR     = '';
   our $PAD       = '  ';
  @@ -257,11 +257,11 @@
               # look for throw action in object, then package
               $throw = exists $self->{ THROW }
                   ? $self->{ THROW }
  -                : ${"$class\::THROW"};
  +                : $class->pkgvar('THROW');
           }
           else {
               # look in package for errors
  -            $throw = ${"$class\::THROW"};
  +            $throw = $class->pkgvar('THROW');
           }
   
           # throw error or return undef/0 value of $throw
  @@ -1168,7 +1168,7 @@
   
   =head1 VERSION
   
  -$Revision: 1.11 $
  +$Revision: 1.12 $
   
   =head1 COPYRIGHT