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

cvs@template-toolkit.org cvs@template-toolkit.org


cvs         05/12/23 17:24:59

  Modified:    lib/Template/Plugin URL.pm
  Log:
  * Added $JOINER to Template::Plugin::URL and updated the tests for it.
  * Added a test file, url2.t, which is the same as url.t except it checks
    for the generated URLs being joined with ;
  See http://lists.template-toolkit.org/pipermail/templates/2005-December/008158.html
  for the thread.
  
  Revision  Changes    Path
  2.68      +5 -4      Template2/lib/Template/Plugin/URL.pm
  
  Index: URL.pm
  ===================================================================
  RCS file: /template-toolkit/Template2/lib/Template/Plugin/URL.pm,v
  retrieving revision 2.67
  retrieving revision 2.68
  diff -u -r2.67 -r2.68
  --- URL.pm	2005/12/23 13:22:25	2.67
  +++ URL.pm	2005/12/23 17:24:59	2.68
  @@ -18,7 +18,7 @@
   #
   #----------------------------------------------------------------------------
   #
  -# $Id: URL.pm,v 2.67 2005/12/23 13:22:25 darren Exp $
  +# $Id: URL.pm,v 2.68 2005/12/23 17:24:59 darren Exp $
   #
   #============================================================================
   
  @@ -27,11 +27,12 @@
   require 5.004;
   
   use strict;
  -use vars qw( @ISA $VERSION );
  +use vars qw( @ISA $VERSION $JOINER );
   use Template::Plugin;
   
   @ISA     = qw( Template::Plugin );
  -$VERSION = sprintf("%d.%02d", q$Revision: 2.67 $ =~ /(\d+)\.(\d+)/);
  +$VERSION = sprintf("%d.%02d", q$Revision: 2.68 $ =~ /(\d+)\.(\d+)/);
  +$JOINER  = ';';
   
   
   #------------------------------------------------------------------------
  @@ -49,7 +50,7 @@
           my $newbase = shift unless ref $_[0] eq 'HASH';
           my $newargs = shift || { };
           my $combo   = { %$args, %$newargs };
  -        my $urlargs = join('&',
  +        my $urlargs = join($JOINER,
   #			   map  { "$_=" . escape($combo->{ $_ }) }
   			   map  { args($_, $combo->{ $_ }) }
   			   grep { defined $combo->{ $_ } && length $combo->{ $_ } }