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