Skip Menu |

This queue is for tickets about the WWW-Wikipedia-TemplateFiller CPAN distribution.

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

People
Owner: diberri [...] cpan.org
Requestors: diberri [...] cpan.org
Cc:
AdminCc:

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



Subject: 'make test' fails in perl 5.10.x
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
On Sun Nov 23 13:31:05 2008, DIBERRI wrote: Show quoted text
> 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
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