[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Bug in MacPERL 5.1.0



I forgot to Cc: this to the list.

"Frank J. Faubert, Jr." <frank@sane.com> writes
>    I believe that I have found a bug in MacPERL 5.1.0.  The following code
>snippet works fine under 5.0.7, but returns -1's in 5.1.0.
>#!/usr/bin/perl
>require 'timelocal.pl';
>
>$Time = time;
>$LocalTime = timelocal( localtime( $Time ) ); 
>$GMTime = timegm( gmtime( $Time ) );

This is one of the unpleasant integer bugs. I did a workaround, but only
in one copy of the code. Simply replacing 

require 'timelocal.pl'; 

with

use Time::Local;

should work.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "Thou shalt not answer questionnaires // Or quizzes upon world affairs,
   Nor with compliance // Take any test. Thou shalt not sit 
   with statisticians nor commit // A social science."
                         -- W.H. Auden, _Under which lyre_