On Tue, Feb 26, 2008 at 11:17:44AM +0000, Karl Dane said:
> Right! So - there's something REALLY weird going on here...
> 
> To answer Simon, cgihash is from perl's CGI lib: my $cgi = new CGI; my 
> $cgihash = $cgi->Vars;
> 
> Shouldn't be anything odd about it. But obviously it's behaving 
> differently for some reason.

Ahah!

Right, from CGI.pm's docs

 The Vars() method does this.  Called in a scalar
 context, it returns the parameter list as a tied hash reference.
 Changing a key changes the value of the parameter in the 
 underlying CGI parameter list.  Called in a list context, it returns 
 the parameter list as an ordinary hash.  This allows you to read the 
 contents of the parameter list, but not to change it.

So you probably want to pass it in to TT as


my %params = (
    cgihash => {%{$cgi->Vars}},
);


or similar.

Simon 

_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to