Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Data-Phrasebook CPAN distribution.

Report information
The Basics
Id: 21743
Status: resolved
Priority: 0/
Queue: Data-Phrasebook

People
Owner: BARBIE [...] cpan.org
Requestors: OLIVER [...] cpan.org
Cc:
AdminCc:

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



Subject: Data::Phrasebook::Generic arg handling to new()
Hi Barbie, In the Data::Phrasebook::Generic (v0.25) docs it says that for arguments to new(), "Each value in the hash is given as an argument to a method of the same name as the key." Except I don't think this is happening, the hash was just being blessed. One side-effect was that according to the Data::Phrasebook docs the dict argument to new should accept either a scalar or an array ref. If a scalar is stored directly and then retrieved via the dict() method, perl dies as it tries to treat the value as an array ref. The patch at the URL below makes the behaviour of Data::Phrasebook::Generic and Data::Phrasebook the same as that described in the documentation. I have included a test case for the scalar dict argument problem I describe above (which fails in 0.25). http://users.ox.ac.uk/~oliver/data/files/DP-generic-argsfix.diff Oh, one other thing... the Data::Phrasebook::Generic docs also talk about an init() routine in the source, but I can't seem to find that. Perhaps that missing routine is something to do with this same bug? regards, oliver.
Patches applied to 0.26. More tests added


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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