[27896] in Perl-Users-Digest
Perl-Users Digest, Issue: 9260 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 8 11:06:34 2006
Date: Thu, 8 Jun 2006 08:05:23 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Thu, 8 Jun 2006 Volume: 10 Number: 9260
Today's topics:
=?utf-8?B?VGhlIE5hdHVyZSBvZiB0aGUg4oCcVW5peCBQaGlsb3Nvc <xah@xahlee.org>
[ANNOUNCE] Emacs modules for Perl programming (Jari Aalto+mail.perl)
Active Perl Package Installation razmaspaz@gmail.com
Re: Active Perl Package Installation <john@castleamber.com>
Re: Active Perl Package Installation razmaspaz@gmail.com
Re: Active Perl Package Installation <benmorrow@tiscali.co.uk>
creating a log file <hara.acharya@gmail.com>
Re: creating a log file <benmorrow@tiscali.co.uk>
Re: default value <nospam@home.com>
Re: filehandle to a member of a zip archive <fleming.scott@gmail.com>
Re: filehandle to a member of a zip archive <DJStunks@gmail.com>
Re: filehandle to a member of a zip archive <tadmc@augustmail.com>
Re: filehandle to a member of a zip archive <Paul.Marquess@btinternet.com>
Re: How do I make web services work with perl ? <trwww@sbcglobal.net>
How does perl get the TZ DST data in Time::Local? cade.robinson@gmail.com
Re: How does perl get the TZ DST data in Time::Local? <john@castleamber.com>
Re: How does perl get the TZ DST data in Time::Local? cade.robinson@gmail.com
Re: How does perl get the TZ DST data in Time::Local? <benmorrow@tiscali.co.uk>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 7 Jun 2006 18:35:52 -0700
From: "Xah Lee" <xah@xahlee.org>
Subject: =?utf-8?B?VGhlIE5hdHVyZSBvZiB0aGUg4oCcVW5peCBQaGlsb3NvcGh54oCd?=
Message-Id: <1149730552.161534.121350@i40g2000cwc.googlegroups.com>
The Nature of the =E2=80=9CUnix Philosophy=E2=80=9D
Xah Lee, 2006-05
In the computing industry, especially among unix community, we often
hear that there's a =E2=80=9CUnix Philosophy=E2=80=9D. In this essay, i dis=
sect the
nature and characterization of such =E2=80=9Cunix philosophy=E2=80=9D, as h=
ave been
described by Brian Kernighan, Rob Pike, Dennis Ritchie, Ken Thompson,
and Richard P Gabriel et al, and in recent years by Eric Raymond.
There is no one definite set of priciples that is the so-called =E2=80=9Cun=
ix
philosophy=E2=80=9D, but rather, it consistest of various slogans developed
over the decades by unix programers that purport to describe the way
unix is supposed to have been designed. The characteristics include:
=E2=80=9Ckeep it simple=E2=80=9D, =E2=80=9Cmake it fast=E2=80=9D, =E2=80=9C=
keep it small=E2=80=9D, =E2=80=9Cmake
it work on 99% of cases, but generality and correctness are less
important=E2=80=9D, =E2=80=9Cdiversity rules=E2=80=9D, =E2=80=9CUser interf=
ace is not
important, raw power is good=E2=80=9D, =E2=80=9Ceverything should be a file=
=E2=80=9D,
=E2=80=9Carchitecture is less important than immediate workability=E2=80=9D=
. Often,
these are expressed by chantible slogans that exhibits juvenile humor,
such as =E2=80=9Csmall is beautiful=E2=80=9D, =E2=80=9CKISS (Keep It Simple=
, Stupid)=E2=80=9D.
Suppose, we take a team of student programers to produce a large
software system. When the software is done, give it to software critics
to analyze and come up with some principles that characterize its
design decisions, without disclosing the nature of the programers. The
characterization of such software, will more or less fit the
descriptions of the =E2=80=9CUnix Philosophy=E2=80=9D as described in diffe=
rent
ways by various unix celebrities.
For example, it would focus on implementation simplicity as opposed to
interface simplicity. It will not be consistent in user interface, but
exhibits rawness. It would be correct only for most cases, as opposed
to mathematically correct or generic. It would employee simplistic data
structures and formats such as text-files, as opposed to a structured
system or binary format that requires a spec. It would be speedy, but
less on scalability. It would consists of many small programs, as
opposed to one large system with inter-dependent components. It would
be easy to patch and port, but difficult to upgrade its structure or
adapt entirely new assumptions.
The essence of this theory is that when a software is produced for real
world use, it is necessary that it works in some acceptable way,
otherwise the software will be continuously debugged and refined. A
software system written by a bunch of student or otherwise
under-educated programers, but refined long enough for acceptably
practical, real world use, will necessarily develop characteristics
that is known as the Unix Philosophy.
----
This article is archived at:
http://xahlee.org/UnixResource_dir/writ/unix_phil.html
Xah
xah@xahlee.org
=E2=88=91 http://xahlee.org/
------------------------------
Date: 08 Jun 2006 04:21:40 GMT
From: <jari.aalto@poboxes.com> (Jari Aalto+mail.perl)
Subject: [ANNOUNCE] Emacs modules for Perl programming
Message-Id: <perl-faq/emacs-lisp-modules_1149740465@rtfm.mit.edu>
Archive-name: perl-faq/emacs-lisp-modules
Posting-Frequency: 2 times a month
Maintainer: Jari Aalto A T cante net
Announcement: "What Emacs lisp modules can help with programming Perl"
Preface
Emacs is your friend if you have to do anything comcerning software
development: It offers plug-in modules, written in Emacs lisp
(elisp) language, that makes all your programmings wishes come
true. Please introduce yourself to Emacs and your programming era
will get a new light.
Where to find Emacs/XEmacs
o Unix:
http://www.gnu.org/software/emacs/emacs.html
http://www.xemacs.org/
o Unix Windows port (for Unix die-hards):
install http://www.cygwin.com/ which includes native Emacs 21.x.
and XEmacs port
o Pure Native Windows port
http://www.gnu.org/software/emacs/windows/ntemacs.html
ftp://ftp.xemacs.org/pub/xemacs/windows/setup.exe
o More Emacs resources at
http://tiny-tools.sourceforge.net/ => Emacs resource page
Emacs Perl Modules
Cperl -- Perl programming mode
http://math.berkeley.edu/~ilya/software/emacs/
by Ilya Zakharevich
CPerl is major mode for editing perl files. Also included in
latest Emacs, but newest version is at Ilya's site. Note that
the directrory at CPAN is out of date:
http://www.cpan.org/modules/by-authors/id/ILYAZ/cperl-mode/
Compared to default `perl-mode' that comes with Emacs, this
one has more features.
TinyPerl -- Perl related utilities
http://tiny-tools.sourceforge.net/
If you ever wonder how to deal with Perl POD pages or how to find
documentation from all perl manpages, this package is for you.
Couple of keystrokes and all the documentaion is in your hands.
o Instant function help: See documentation of `shift', `pop'...
o Show Perl manual pages in *pod* buffer
o Grep through all Perl manpages (.pod)
o Follow POD references e.g. [perlre] to next pod with RETURN
o Coloured pod pages with `font-lock'
o Separate `tiperl-pod-view-mode' for jumping topics and pages
forward and backward in *pod* buffer.
o Update `$VERSION' variable with YYYY.MMDD on save.
o Load source code into Emacs, like Devel::DProf.pm
o Prepare script (version numbering) and Upload it to PAUSE
o Generate autoload STUBS (Devel::SelfStubber) for you
Perl Module (.pm)
TinyIgrep -- Perl Code browsing and easy grepping
[TinyIgrep is included in Tiny Tools Kit]
To grep from all installed Perl modules, define database to
TinyIgrep. There is example file emacs-rc-tinyigrep.el that shows
how to set up dattabases for Perl5, Perl4 whatever you have
installed
TinyIgrep calls Igrep.el to to do the search, You can adjust
recursive grep options, set search case sensitivity, add user grep
options etc.
You can find latest `igrep.el' module at
<http://groups.google.com/groups?group=gnu.emacs.sources> The
maintainer is Jefin Rodgers <kevinr@ihs.com>.
TinyCompile -- To Browse grep results in Emacs *compile* buffer
TinyCompile is a minor mode for *compile* buffer from where
you can collapse unwanted lines or shorten file URLs:
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file1:NNN: MATCHED TEXT
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file2:NNN: MATCHED TEXT
-->
cd /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/
file1:NNN: MATCHED TEXT
file1:NNN: MATCHED TEXT
End
------------------------------
Date: 7 Jun 2006 10:53:52 -0700
From: razmaspaz@gmail.com
Subject: Active Perl Package Installation
Message-Id: <1149702832.828693.81350@u72g2000cwu.googlegroups.com>
I'm using active perl 5.8.8 on WinXP. I am trying to install the
Crypt::SSLeay package using the command:
ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
I get the following error:
Error: No valid repositories: Error: 500 Can't connect to
ppm.ActiveState.com:80 (connect: Unknown error)
I can ping theoryx5 and I can get the url to appear in the browser. Am
I missing something?
It seems like the ppm is trying to get to ActiveState. Am I supposed
to send some argument to the install cmd to get it to look elsewhere?
Thanks,
Michael
------------------------------
Date: 7 Jun 2006 17:59:10 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Active Perl Package Installation
Message-Id: <Xns97DB841A07600castleamber@130.133.1.4>
razmaspaz@gmail.com wrote:
> I'm using active perl 5.8.8 on WinXP. I am trying to install the
> Crypt::SSLeay package using the command:
> ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
>
> I get the following error:
> Error: No valid repositories: Error: 500 Can't connect to
> ppm.ActiveState.com:80 (connect: Unknown error)
>
> I can ping theoryx5 and I can get the url to appear in the browser. Am
> I missing something?
>
> It seems like the ppm is trying to get to ActiveState. Am I supposed
> to send some argument to the install cmd to get it to look elsewhere?
Odd that ppm tries to connect to ActiveState. But ActiveState has now and
then problems with the repository, so I would suggest to try again a bit
later.
But its odd that it connects anyway. Some might say: spyware :-D.
--
John Bokma Freelance software developer
&
Experienced Perl programmer: http://castleamber.com/
------------------------------
Date: 7 Jun 2006 11:08:28 -0700
From: razmaspaz@gmail.com
Subject: Re: Active Perl Package Installation
Message-Id: <1149703708.603436.113680@g10g2000cwb.googlegroups.com>
If I grab the tarball can I just install it from a local source or do I
have to get it from the URL?
Michael
John Bokma wrote:
> razmaspaz@gmail.com wrote:
>
> > I'm using active perl 5.8.8 on WinXP. I am trying to install the
> > Crypt::SSLeay package using the command:
> > ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
> >
> > I get the following error:
> > Error: No valid repositories: Error: 500 Can't connect to
> > ppm.ActiveState.com:80 (connect: Unknown error)
> >
> > I can ping theoryx5 and I can get the url to appear in the browser. Am
> > I missing something?
> >
> > It seems like the ppm is trying to get to ActiveState. Am I supposed
> > to send some argument to the install cmd to get it to look elsewhere?
>
> Odd that ppm tries to connect to ActiveState. But ActiveState has now and
> then problems with the repository, so I would suggest to try again a bit
> later.
>
> But its odd that it connects anyway. Some might say: spyware :-D.
>
> --
> John Bokma Freelance software developer
> &
> Experienced Perl programmer: http://castleamber.com/
------------------------------
Date: Wed, 7 Jun 2006 22:03:11 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: Active Perl Package Installation
Message-Id: <fhrjl3-74g.ln1@osiris.mauzo.dyndns.org>
[top-quoteing fixed. Please don't do that]
Quoth razmaspaz@gmail.com:
> John Bokma wrote:
> > razmaspaz@gmail.com wrote:
> >
> > > I'm using active perl 5.8.8 on WinXP. I am trying to install the
> > > Crypt::SSLeay package using the command:
> > > ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd
> > >
> > > I get the following error:
> > > Error: No valid repositories: Error: 500 Can't connect to
> > > ppm.ActiveState.com:80 (connect: Unknown error)
> > >
> > > I can ping theoryx5 and I can get the url to appear in the browser. Am
> > > I missing something?
> > >
> > > It seems like the ppm is trying to get to ActiveState. Am I supposed
> > > to send some argument to the install cmd to get it to look elsewhere?
> >
> > Odd that ppm tries to connect to ActiveState. But ActiveState has now and
> > then problems with the repository, so I would suggest to try again a bit
> > later.
> >
> > But its odd that it connects anyway. Some might say: spyware :-D.
> >
> If I grab the tarball can I just install it from a local source or do I
> have to get it from the URL?
If you get both the tarball and the ppd you should be able to install
them from the local disk. You may need to edit the paths in the ppd: the
format is pretty obvious. However, since ppm is trying to connect to
ActiveState when it doesn't need to, it may continue to do so... if you
can't fix your connection issues, you could try removing
ppm.activestate.com from your repository list, at least temporarily. I
can't remember how this is done (no Win32 machine to hand) but the docs
are pretty clear.
Ben
--
The cosmos, at best, is like a rubbish heap scattered at random.
Heraclitus
benmorrow@tiscali.co.uk
------------------------------
Date: 7 Jun 2006 06:50:17 -0700
From: "king" <hara.acharya@gmail.com>
Subject: creating a log file
Message-Id: <1149688217.404546.78980@g10g2000cwb.googlegroups.com>
Hi I am running so many commands in a single perl script.
Now i want to create a log file which will save the output of the
commands.
I am using win32::process for running commands in perl.
so how i will save the outputs of commands in a log file.
because redirest is not working in win32::process.
My idea is what ever i am running inside script, i want a log file for
that.
------------------------------
Date: Wed, 7 Jun 2006 16:10:20 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: creating a log file
Message-Id: <sr6jl3-76d.ln1@osiris.mauzo.dyndns.org>
Quoth "king" <hara.acharya@gmail.com>:
> Hi I am running so many commands in a single perl script.
> Now i want to create a log file which will save the output of the
> commands.
> I am using win32::process for running commands in perl.
I doubt that; there is no such module AFAIK. Do you mean Win32::Process?
> so how i will save the outputs of commands in a log file.
> because redirest is not working in win32::process.
You *ought* to be able to redirect STD{IN,OUT,ERR} to wherever using
Win32::Process; but I have found it unreliable in the past. Provided
you are using a new enough version of Windows (NT >2000), cmd.exe has
Bourne-ish redirection operators, so you're (IME) better off using
system instead. Don't try and use the list version, though: it isn't
any safer on Win32, 'cos Win32's argv passing is broken, and you can't
do redirects.
Ben
--
The cosmos, at best, is like a rubbish heap scattered at random.
Heraclitus
benmorrow@tiscali.co.uk
------------------------------
Date: Sat, 03 Jun 2006 21:25:24 GMT
From: "Nospam" <nospam@home.com>
Subject: Re: default value
Message-Id: <87ngg.2157$n13.758@newsfe2-win.ntli.net>
"Brian Wakem" <no@email.com> wrote in message
news:4eeaflF1eg79bU1@individual.net...
> Nospam wrote:
>
> >
> > "Brian Wakem" <no@email.com> wrote in message
> > news:4ee3feF1d8e9gU1@individual.net...
> >> Nospam wrote:
> >>
> >> >
> >> > "Bart Van der Donck" <bart@nijlen.com> wrote in message
> >> > news:1149341535.307390.210370@f6g2000cwb.googlegroups.com...
> >> >> Nospam wrote:
> >> >>
> >> >> > does anyone know a command to leave the default value for a field
in
> > a
> >> >> > browser i.e something like field('value',); would something like
> >> >> > this
> >> > leave
> >> >> > the default value in?
> >> >>
> >> >> This sounds (!) like an HTML question, please see alt.html. Maybe
you
> >> >> mean:
> >> >>
> >> >> <input type="text" size="5" value="apple">
> >> >>
> >> >> --
> >> >> Bart
> >> >>
> >> >
> >> > I have something like
> >> >
> >> > <input type="hidden" name="field1" value="500" />
> >> >
> >> > this is the default value if I look at the source code in the
browser,
> >> > however I would like the field in mechanize to automatically use this
> >> > default value, I have tried different connotations but none so far
have
> >> > worked:
> >>
> >>
> >> You need do nothing, the preset values will be used my WWW::Mechanize
> >> automatically.
> >
> > If this was a hidden field would I still need to do nothing?
>
>
> Yes.
I have tried ignoring the hidden field with this program but it doesn't work
:
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use WWW::Mechanize;
my $START='http://www.collegev2.com/?p=59';
my $mech = WWW::Mechanize->new();
$mech->get( $START );
$mech->form(2);
$mech->field('author','Eric Nuorven');
$mech->field('email','ericn@example.com');
$mech->field('url','');
$mech->field('comment','Great idea');
#$mech->field('comment_post_ID','');
$mech->click("submit");
------------------------------
Date: 6 Jun 2006 16:27:20 -0700
From: "scottmf" <fleming.scott@gmail.com>
Subject: Re: filehandle to a member of a zip archive
Message-Id: <1149636440.415351.207650@y43g2000cwc.googlegroups.com>
Thanks, I'll look into that when I get a chance. Also, is there any
way I can make my subroutine take in a barwood operator for the
filehandle. I would like to be able to easily implement this in old
code I have by just replacing my open(FH, "filename") with mod_open(FH,
"filename") instead of having to use $FH and changing all the
references throughout the script from FH to $FH
Thanks for the help,
~Scott
------------------------------
Date: 6 Jun 2006 18:47:47 -0700
From: "DJ Stunks" <DJStunks@gmail.com>
Subject: Re: filehandle to a member of a zip archive
Message-Id: <1149644867.160081.86460@j55g2000cwa.googlegroups.com>
scottmf wrote:
> Thanks, I'll look into that when I get a chance. Also, is there any
> way I can make my subroutine take in a barwood operator for the
> filehandle. I would like to be able to easily implement this in old
> code I have by just replacing my open(FH, "filename") with mod_open(FH,
> "filename") instead of having to use $FH and changing all the
> references throughout the script from FH to $FH
>
> Thanks for the help,
> ~Scott
perl -pi~ -e " s'FH'$FH' " source.pl
-jp
------------------------------
Date: Tue, 6 Jun 2006 19:37:06 -0500
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: filehandle to a member of a zip archive
Message-Id: <slrne8c7ti.nma.tadmc@magna.augustmail.com>
scottmf <fleming.scott@gmail.com> wrote:
> Thanks, I'll look into that when I get a chance.
Look into what?
Please quote some context in followups like everybody else does.
> Also, is there any
> way I can make my subroutine take in a barwood operator for the
> filehandle.
No.
There is no such thing as a "bareword operator", so I guess
you meant "bareword filehandle" instead.
> I would like to be able to easily implement this in old
> code I have by just replacing my open(FH, "filename") with mod_open(FH,
> "filename") instead of having to use $FH
s/open\(/mod_open(/;
is a lot easier than
s/open\(/mod_open(\$/;
??
> and changing all the
> references throughout the script from FH to $FH
That could be cumbersome.
(Seems like:
s/<FH>/<\$FH>/g;
s/(printf? )FH/$1\$FH/g;
would come pretty darn close though.
You can pass a type glob, or a reference to a type glob as
described in the answer to your Frequently Asked Question:
perldoc -q filehandle
How can I make a filehandle local to a subroutine? How do I pass file-
handles between subroutines? How do I make an array of filehandles?
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: Wed, 7 Jun 2006 15:01:43 +0100
From: "Paul Marquess" <Paul.Marquess@btinternet.com>
Subject: Re: filehandle to a member of a zip archive
Message-Id: <4486dc64$0$15870$4d4eb98e@read.news.uk.uu.net>
"DJ Stunks" <DJStunks@gmail.com> wrote in message
news:1149644867.160081.86460@j55g2000cwa.googlegroups.com...
>
> scottmf wrote:
>> Thanks, I'll look into that when I get a chance. Also, is there any
>> way I can make my subroutine take in a barwood operator for the
>> filehandle. I would like to be able to easily implement this in old
>> code I have by just replacing my open(FH, "filename") with mod_open(FH,
>> "filename") instead of having to use $FH and changing all the
>> references throughout the script from FH to $FH
>>
>> Thanks for the help,
>> ~Scott
>
> perl -pi~ -e " s'FH'$FH' " source.pl
You could try something like this
mod_open(FH, "filename");
sub mod_open{
...
$FH = IO::File->new($file_name, "r") ;
...
## now pass the file handle back to the user for reading or writing
my $href = \*{ $_[0] };
$$href = $FH;
}
------------------------------
Date: Tue, 06 Jun 2006 21:31:06 GMT
From: "Todd W" <trwww@sbcglobal.net>
Subject: Re: How do I make web services work with perl ?
Message-Id: <uumhg.40642$fb2.16434@newssvr27.news.prodigy.net>
<dmedhora@gmail.com> wrote in message
news:1149591758.518258.28390@f6g2000cwb.googlegroups.com...
>I mean really now... I've tried the examples in the documentation and
> though a simple client and server works, its practically impossible for
> me to get WSDL::Generator working.
> I'm sure I'm doing something wrong, or the documentation sucks.
> Can someone help me find out?
>
I got the book "Programming Web Services with SOAP" and "Programming Web
Services with Perl" when I started my SOAP career. The latter book was
written by the perl<->soap pioneers. After doing all the examples and
excercises in each book, they have augmented the documentation nicely for
me.
>
> Do people program web services with perl?
>
Like a pro :-)
Sounds to me like you just need to familiarize yourself a bit more with the
perl XML and SOAP libraries. If you don't know what each line of SOAP code
you run is doing in the callee, you are probably going to have problems.
The funnest SOAP client I did was http://www.weather.gov/xml/. The soap end
worked flawlessly, I didn't have to step in to even a single line of SOAP
code in the debugger. Another super cool one was
http://www.newyorkfed.org/markets/pilotfx.html
As far as WSDL::Generator... when I need to write a server and I get to
design it, I just use XML-RPC. Its a lot simpler and the javascript clients
aren't so heavy (http://www.xmlrpc.com/directory/1568/implementations).
Next to the XML modules themselves, the perl SOAP modules are probably the
coolest thing on CPAN.
Todd W.
------------------------------
Date: 7 Jun 2006 10:40:56 -0700
From: cade.robinson@gmail.com
Subject: How does perl get the TZ DST data in Time::Local?
Message-Id: <1149702055.933265.249630@f6g2000cwb.googlegroups.com>
I just read that in 2007 in the US that DST is changing dates.
Looks like all computers will need a patch for the TZ data and DST
changes.
My question is how does perl get TZ data?
Does it pull it from the machine?
So for example next year between 3/11 and 4/1 what happens when you use
Time::Local and use "timelocal" on the second past epoch?
Normally say you have X seconds and that translates to say Mar 20th
10:00am 2007.
Is that going to be the correct 10:00 am or will it be an hour behind?
If Time::Local has internal DST change tables won't that time be off?
Thanks
Cade
------------------------------
Date: 7 Jun 2006 17:57:22 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: How does perl get the TZ DST data in Time::Local?
Message-Id: <Xns97DB83CC51861castleamber@130.133.1.4>
cade.robinson@gmail.com wrote:
> I just read that in 2007 in the US that DST is changing dates.
>
> Looks like all computers will need a patch for the TZ data and DST
> changes.
Yup, happened too when MS released Windows95 :-D.
--
John Bokma Freelance software developer
&
Experienced Perl programmer: http://castleamber.com/
------------------------------
Date: 7 Jun 2006 13:05:51 -0700
From: cade.robinson@gmail.com
Subject: Re: How does perl get the TZ DST data in Time::Local?
Message-Id: <1149710750.966680.67970@g10g2000cwb.googlegroups.com>
I revise this to include the "localtime" function.
I just tested on my Debian machine by getting the the seconds now with
"time" and then adding 276 days of seconds to it which put it at
3/10/07 and localtime shows that it is right. Then I add another day
and it shows that the DST offset happened.
I also tried on a Tru64 machine and it is wrong.
So is that perl or the OS?
cade.robinson@gmail.com wrote:
> I just read that in 2007 in the US that DST is changing dates.
>
> Looks like all computers will need a patch for the TZ data and DST
> changes.
>
> My question is how does perl get TZ data?
> Does it pull it from the machine?
>
> So for example next year between 3/11 and 4/1 what happens when you use
> Time::Local and use "timelocal" on the second past epoch?
>
> Normally say you have X seconds and that translates to say Mar 20th
> 10:00am 2007.
>
> Is that going to be the correct 10:00 am or will it be an hour behind?
>
> If Time::Local has internal DST change tables won't that time be off?
>
> Thanks
> Cade
------------------------------
Date: Wed, 7 Jun 2006 21:47:22 +0100
From: Ben Morrow <benmorrow@tiscali.co.uk>
Subject: Re: How does perl get the TZ DST data in Time::Local?
Message-Id: <qjqjl3-74g.ln1@osiris.mauzo.dyndns.org>
Quoth cade.robinson@gmail.com:
> I just read that in 2007 in the US that DST is changing dates.
>
> Looks like all computers will need a patch for the TZ data and DST
> changes.
>
> My question is how does perl get TZ data?
> Does it pull it from the machine?
Yup, or at least, the modules I know about do :). (There's nothing to
prevent someone from writing a TZ system in Perl, but...)
Presumably you will need to update your tz database from somewhere, the
procedure for which will depend on your OS (come to think of it, I don't
know how to do it for mine... not that I care terribly much, not being
in the US :) ).
Ben
--
The cosmos, at best, is like a rubbish heap scattered at random.
Heraclitus
benmorrow@tiscali.co.uk
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 9260
***************************************