This queue is for tickets about the HTML-Template CPAN distribution.

Report information
The Basics
Id:
64158
Status:
new
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
intrigeri [...] boum.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



From intrigeri@boum.org Wed Dec 22 13: 50:06 2010
MIME-Version: 1.0
X-Spam-Status: No, score=-5.974 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, FRT_OFFER2=0.926, RCVD_IN_DNSWL_HI=-5] autolearn=ham
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"
Message-ID: <85fwtpk5gz.fsf@boum.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -5.974
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id DF2642412F9 for <cpan-bug+HTML-Template@hipster.bestpractical.com>; Wed, 22 Dec 2010 13:50:05 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id etKV8ksFAFtj for <cpan-bug+HTML-Template@hipster.bestpractical.com>; Wed, 22 Dec 2010 13:50:03 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 5A568241210 for <bug-HTML-Template@rt.cpan.org>; Wed, 22 Dec 2010 13:50:03 -0500 (EST)
Received: (qmail 24504 invoked by uid 103); 22 Dec 2010 18:50:02 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 22 Dec 2010 18:50:02 -0000
Received: from boum.org (HELO boum.org) (204.13.164.185) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Wed, 22 Dec 2010 10:50:00 -0800
Received: from localhost (localhost [127.0.0.1]) by boum.org (Postfix) with ESMTP id 4195C4892741 for <bug-HTML-Template@rt.cpan.org>; Wed, 22 Dec 2010 10:49:54 -0800 (PST)
Received: from boum.org ([204.13.164.185]) by localhost (censure.boum.org [10.36.27.20]) (amavisd-new, port 10024) with ESMTP id fLjdwKK+Sh2F for <bug-HTML-Template@rt.cpan.org>; Wed, 22 Dec 2010 10:49:53 -0800 (PST)
Received: from localhost (localhost [127.0.0.1]) by boum.org (Postfix) with ESMTPSA id D669D4892740 for <bug-HTML-Template@rt.cpan.org>; Wed, 22 Dec 2010 10:49:52 -0800 (PST)
Received: from ensifera (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 30EF57A0BE6 for <bug-HTML-Template@rt.cpan.org>; Wed, 22 Dec 2010 19:49:48 +0100 (CET)
Delivered-To: cpan-bug+HTML-Template@hipster.bestpractical.com
Subject: Silently forgets value of unknown parameter despite die_on_bad_params set to false
User-Agent: SquirrelMail/1.5.2 [SVN]
Return-Path: <intrigeri@boum.org>
X-RT-Mail-Extension: html-template
X-Original-To: cpan-bug+HTML-Template@hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Date: Wed, 22 Dec 2010 19:49:48 +0100
X-Spam-Level:
To: bug-HTML-Template@rt.cpan.org
From: intrigeri <intrigeri@boum.org>
X-RT-Original-Encoding: us-ascii
Content-Length: 1758
Hi, ikiwiki [0] is using HTML::Template. I am currently testing using HTML::Template 2.9-2 (i.e. 2.9 upstream with second Debian packaging patch level) and Perl v5.10.1 (Debian Squeeze). [0] http://ikiwiki.info/ We are currently hunting a bug [1] that only appears once we started using a template parameter that is not defined in the template. We set this parameter like this: $template->param(title_overridden => 1); If I immediately try to access its value: $template->param('title_overridden') ... I always get undef. [1] http://ikiwiki.info/bugs/po:_plugin_should_not_override_the_title_on_the_homepage/ FYI we are passing the following options to the HTML::Template constructor: filter => sub { my $text_ref = shift; ${$text_ref} = decode_utf8(${$text_ref}); }, loop_context_vars => 1, die_on_bad_params => 0, In order to fix this bug I have to pass (the undocumented) "parent_global_vars => 1" to the HTML::Template constructor so that HTML::Template::param initializes $param_map->{$param} before checking its reference type. Setting "global_vars => 1" does not fix this bug. I am pretty sure there is a better way to get the desired behavior, either by passing a better suited parameter to the HTML::Template constructor, or by fixing an underlying bug. My debugging efforts lead me to think the $options->{parent_global_vars} that can be seen by the param sub $options->sometimes did not inherit the global_vars setting. Bye, -- intrigeri <intrigeri@boum.org> | GnuPG key @ https://gaffer.ptitcanardnoir.org/intrigeri/intrigeri.asc | OTR fingerprint @ https://gaffer.ptitcanardnoir.org/intrigeri/otr-fingerprint.asc | We're dreaming of something else. | Something more clandestine, something happier.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.