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: 46119
Status: resolved
Priority: 0/
Queue: DateTime-TimeZone

People
Owner: Nobody in particular
Requestors: jozef [...] kutej.net
Cc:
AdminCc:

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



Subject: linux should be considered Unix
despite comment say: # Stolen from File::Spec. My theory is that other folks can write # the non-existent modules if they feel a need, and release them # to CPAN separately. linux should be considered Unix. (???) (patch attached) j
Subject: unix-subclass-for-linux.patch
#! /bin/sh /usr/share/dpatch/dpatch-run ## proper subclass for linux @DPATCH@ diff -Naur corp-libdatetime-timezone-perl-0.90.orig/lib/DateTime/TimeZone/Local.pm corp-libdatetime-timezone-perl-0.90/lib/DateTime/TimeZone/Local.pm --- corp-libdatetime-timezone-perl-0.90.orig/lib/DateTime/TimeZone/Local.pm 2009-04-27 15:58:35.000000000 +0000 +++ corp-libdatetime-timezone-perl-0.90/lib/DateTime/TimeZone/Local.pm 2009-05-15 15:07:03.000000000 +0000 @@ -39,6 +39,7 @@ symbian => 'Win32', dos => 'OS2', cygwin => 'Unix', + linux => 'Unix', ); sub _load_subclass
Unix is the default, so it really doesn't matter. There's probably lots of $^O strings (for BSD, OSX, etc) that are also Unix and not in the list.
no Unix is not default: my $os_name = $subclass{ $^O } || $^O; if the $^O key is not found it's the "$^O". So for Linux it's "linux" which doesn't exists. File::Spec has Unix as default: my $module = $module{$^O} || 'Unix'; Regards, Jozef
Subject: Re: [rt.cpan.org #46119] linux should be considered Unix
Date: Mon, 8 Jun 2009 11:35:51 -0500 (CDT)
To: Jozef Kutej via RT <bug-DateTime-TimeZone [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Mon, 8 Jun 2009, Jozef Kutej via RT wrote: Show quoted text
> Queue: DateTime-TimeZone > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=46119 > > > no Unix is not default: > > my $os_name = $subclass{ $^O } || $^O; > > if the $^O key is not found it's the "$^O". So for Linux it's "linux" > which doesn't exists.
Read a little further. If it can't load a linux subclass it falls back to Unix. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Subject: Re: [rt.cpan.org #46119] linux should be considered Unix
Date: Mon, 08 Jun 2009 20:12:54 +0200
To: bug-DateTime-TimeZone [...] rt.cpan.org
From: Jozef Kutej <jozef [...] kutej.net>
autarch@urth.org via RT wrote: Show quoted text
> Read a little further. If it can't load a linux subclass it falls back to > Unix.
upsss, sorry yes it's there. then i'll have to look why the eval errors where showing up in our logs... but that has nothing to do with this module, so sorry for bothering. thank you! jozef
Subject: Re: [rt.cpan.org #46119] linux should be considered Unix
Date: Mon, 8 Jun 2009 13:15:58 -0500 (CDT)
To: Jozef Kutej via RT <bug-DateTime-TimeZone [...] rt.cpan.org>
From: Dave Rolsky <autarch [...] urth.org>
On Mon, 8 Jun 2009, Jozef Kutej via RT wrote: Show quoted text
> Queue: DateTime-TimeZone > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=46119 > > > autarch@urth.org via RT wrote:
>> Read a little further. If it can't load a linux subclass it falls back to >> Unix.
> > upsss, sorry yes it's there. then i'll have to look why the eval errors > where showing up in our logs... but that has nothing to do with this > module, so sorry for bothering.
I should local-ize $@ first, so it doesn't propogate. That's probably the issue. Your issue may be code that does an eval, then checks $@ without seeing if the eval'd operation succeeded. I would recommend something like: unless ( eval "...; 1" ) { check $@ } But I should still local-ize $@ for hygiene. -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
there is no bug :-)