Skip Menu | You are currently an anonymous guest. | Login | Return to Main | About rt.cpan.org
 

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

X Report information
Id: 41162
Status: resolved
Worked: 1.5 hours (90 min)
Left: 0 min
Priority: 0/0
Queue: WWW-Wikipedia-TemplateFiller

Owner: DIBERRI <diberri [...] cpan.org>
Requestors: DIBERRI <diberri [...] cpan.org>
Cc:
AdminCc:

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



X History Display mode: Brief headersFull headers
#   Sun Nov 23 13:31:05 2008 DIBERRI - Ticket created  
Subject: 'make test' fails in perl 5.10.x
[text/plain 335b]
I don't have 5.10.x on my system, but reviewing the CPAN Testers reports
shows that 'make test' fails on these systems. At least part of the
problem appears to be that certain template fields are displayed
inappropriately. An example is the language field, which normally is
treated as a show-only-if-filled parameter.

-- David Iberri
#   Sun Nov 23 20:13:14 2008 DIBERRI - Status changed from 'new' to 'open'  
#   Sun Nov 23 20:19:18 2008 DIBERRI - Correspondence added 45 min  
[text/plain 1.4k]
On Sun Nov 23 13:31:05 2008, DIBERRI wrote:
> I don't have 5.10.x on my system, but reviewing the CPAN Testers reports
> shows that 'make test' fails on these systems. At least part of the
> problem appears to be that certain template fields are displayed
> inappropriately. An example is the language field, which normally is
> treated as a show-only-if-filled parameter.
>
> -- David Iberri

I presume this is due to a problem with how perl 5.10.x interprets hash
keys. The way WTF currently tags show-only-if-filled and
show-only-if-extended parameters is by altering how keys are entered in
the hash, eg:

%fields = (
-name => $self->{name}, # this field will always be shown
id => $self->{id}, # this will only appear if $self->{id} is not null
'+doi' => $self->{doi}, # this will only appear if 'show extended
fields' is enabled
);

I suspect perl 5.10.x is not seeing these leading characters the same
way that prior versions of perl are. I presume the solution is to switch
from this bizarre notation to something more explicit and unambiguous:

%fields = (
name => { value => $self->{name} },
id => { value => $self->{id}, show => 'if-filled' },
doi => { value => $self->{doi}, show => 'if-extended' },
);

That should do the trick, but I won't know until it's tested with perl
5.10.x. So I'm releasing WTF 0.08, which includes the above changes, and
leaving this bug open. Once the CPANTS results show that we're
successful on perl 5.10.x, I'll close this bug and we'll be on our way.

-- David Iberri
#   Sun Nov 23 20:19:25 2008 DIBERRI - Given to DIBERRI  
#   Tue Nov 25 07:22:44 2008 DIBERRI - Correspondence added  
[text/plain 762b]
After applying a patch for the problem described above and releasing WTF
0.08, 'make test' still chokes on perl 5.10.x with the following error:

Insecure dependency in sprintf while running with -T switch at
/home/cpan/rel/conf/perl-5.10.0/.cpanplus/5.10.0/build/WWW-Wikipedia-TemplateFiller-0.08/blib/lib/WWW/Wikipedia/TemplateFiller/Source/PubchemId.pm
line 43, <DATA> line 484.

See [1] for an example.

It appears that sprintf (and printf) can no longer accept tainted values
running under -T. This is understandable, but I cannot easily determine
the tainted values at the source of this fuss. I've eliminated the use
of sprintf from PubchemId.pm. Hopefully all will be well now.

-- David Iberri

[1] http://nntp.x.perl.org/group/perl.cpan.testers/2678983
#   Sun Nov 30 10:29:01 2008 DIBERRI - Correspondence added 45 min  
[text/plain 163b]
Seems fixed now. [1] Closing this ticket.

-- David Iberri

[1]
http://www.cpantesters.org/show/WWW-Wikipedia-TemplateFiller.html#WWW-Wikipedia-TemplateFiller-0.09
#   Sun Nov 30 10:29:02 2008 DIBERRI - Status changed from 'open' to 'resolved'