Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime-TimeZone CPAN distribution.

Report information
The Basics
Id: 27843
Status: resolved
Priority: 0/
Queue: DateTime-TimeZone

People
Owner: Nobody in particular
Requestors: john-perl [...] o-rourke.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.6602
Fixed in: 0.6603



names_in_country works fine in list context, but returns a list ref to a list ref in scalar context. ------------------------------- REPRODUCE WITH: perl -MDateTime::TimeZone -MData::Dumper -e 'print Dumper(scalar(DateTime::TimeZone->names_in_country("US")))' ------------------------------- FIX WITH: 1852c1852 < return wantarray ? @{ $DateTime::TimeZone::ZONES_BY_COUNTRY{ lc $_[0] } } : [ $DateTime::TimeZone::ZONES_BY_COUNTRY{ lc $_[0] } ]; --- Show quoted text
> return wantarray ? @{ $DateTime::TimeZone::ZONES_BY_COUNTRY{ lc
$_[0] } } : $DateTime::TimeZone::ZONES_BY_COUNTRY{ lc $_[0] }; ------------------------------- thanks!
Subject: names_in_country incorrect return in scalar context
Sorry, I made a bit of a hash of opening this - forgot the subject line and accidentally changed status to open!