[Templates-cvs] cvs commit: Template2/lib/Template/Plugin Dumper.pm

cvs@template-toolkit.org cvs@template-toolkit.org
Tue, 01 Jul 2003 13:46:35 +0100


cvs         03/07/01 12:46:35

  Modified:    lib/Template/Plugin Dumper.pm
  Log:
  Makes all Data::Dumper package variables available (this adds Purity, Useqq, Terse, Freezer, Toaster, Deepcopy, Quotekeys, Bless, and Maxdepth)
  
  Revision  Changes    Path
  2.59      +6 -4      Template2/lib/Template/Plugin/Dumper.pm
  
  Index: Dumper.pm
  ===================================================================
  RCS file: /template-toolkit/Template2/lib/Template/Plugin/Dumper.pm,v
  retrieving revision 2.58
  retrieving revision 2.59
  diff -u -r2.58 -r2.59
  --- Dumper.pm	2003/04/24 09:14:43	2.58
  +++ Dumper.pm	2003/07/01 12:46:34	2.59
  @@ -18,7 +18,7 @@
   #
   #------------------------------------------------------------------------------
   #
  -# $Id: Dumper.pm,v 2.58 2003/04/24 09:14:43 abw Exp $
  +# $Id: Dumper.pm,v 2.59 2003/07/01 12:46:34 darren Exp $
   # 
   #==============================================================================
   
  @@ -30,11 +30,13 @@
   use Template::Plugin;
   use Data::Dumper;
   
  -use vars qw( $VERSION $DEBUG $AUTOLOAD );
  +use vars qw( $VERSION $DEBUG @DUMPER_ARGS $AUTOLOAD );
   use base qw( Template::Plugin );
   
  -$VERSION = sprintf("%d.%02d", q$Revision: 2.58 $ =~ /(\d+)\.(\d+)/);
  +$VERSION = sprintf("%d.%02d", q$Revision: 2.59 $ =~ /(\d+)\.(\d+)/);
   $DEBUG   = 0 unless defined $DEBUG;
  +@DUMPER_ARGS = qw( Indent Pad Varname Purity Useqq Terse Freezer
  +                   Toaster Deepcopy Quotekeys Bless Maxdepth );
   
   #==============================================================================
   #                      -----  CLASS METHODS -----
  @@ -50,7 +52,7 @@
       $params ||= { };
   
   
  -    foreach my $arg (qw( Indent Pad Varname )) {
  +    foreach my $arg (@DUMPER_ARGS) {
   	no strict 'refs';
   	if (defined ($val = $params->{ lc $arg })
   	    or defined ($val = $params->{ $arg })) {