[29028] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 272 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Mar 27 16:34:37 2007

Date: Tue, 27 Mar 2007 13:34:30 -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           Tue, 27 Mar 2007     Volume: 11 Number: 272

Today's topics:
        Seeking recommendation for Web framework canfieldsteve@hotmail.com
    Re: Seeking recommendation for Web framework <bik.mido@tiscalinet.it>
    Re: Seeking recommendation for Web framework <spamtrap@dot-app.org>
    Re: Seeking recommendation for Web framework (Jens Thoms Toerring)
    Re: Seeking recommendation for Web framework (Jamie)
    Re: Seeking recommendation for Web framework <wahab-mail@gmx.de>
    Re: Seeking recommendation for Web framework <bik.mido@tiscalinet.it>
    Re: Seeking recommendation for Web framework <spamtrap@dot-app.org>
    Re: Seeking recommendation for Web framework <bik.mido@tiscalinet.it>
        Sweetest Accessor? <please@nospam.net>
    Re: Sweetest Accessor? anno4000@radom.zrz.tu-berlin.de
    Re: Sweetest Accessor? <paduille.4060.mumia.w+nospam@earthlink.net>
    Re: time structure without shift (hymie!)
    Re: time structure without shift <jurgenex@hotmail.com>
    Re: time structure without shift <stoupa@practisoft.cz>
    Re: time structure without shift <scobloke2@infotop.co.uk>
        using ftp from perl script <vaibhav.aparimit@gmail.com>
    Re: using ftp from perl script <scobloke2@infotop.co.uk>
    Re: using ftp from perl script <vaibhav.aparimit@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: 26 Mar 2007 14:34:39 -0700
From: canfieldsteve@hotmail.com
Subject: Seeking recommendation for Web framework
Message-Id: <1174944879.716311.182400@p15g2000hsd.googlegroups.com>

I'm getting ready to set up a new web site, and of course I'd like to
avoid doing a lot of work that's already been done before.  I'm
looking at the list of frameworks that are out there, but there are so
many.  Perhaps someone here can recommend something for my needs.

Here's what I need:

- Basic authentication stuff: The site will require users to login and
out.  There should be your basic authentication stuff: a login form, a
logout page, and an "I forgot my password" page.

- Minimal magic: Let me code my way.  A lot of frameworks seem to be
built on the idea that I should code the way the framework designers
code.  I don't want to be forced into someone else's idea of The Right
Way. I also don't need or want a lot of features beyond the
authentication stuff.  I actually find that the more a framework talks
about how easy it will make my life, the more difficult it makes my
life.

- Easy install: The site I'm creating will eventually be released open
source.  I'd like to avoid telling potential users of my site that
first they have to install some huge framework.  Really, I'd love it
if the framework just consisted of just one or two modules that can be
copied into one of the @INC directories and that's the whole install.

Any suggestions?



------------------------------

Date: Tue, 27 Mar 2007 00:14:49 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Seeking recommendation for Web framework
Message-Id: <m9hg0395g1ioi7dn3t3iu3vnt998p0s99s@4ax.com>

On 26 Mar 2007 14:34:39 -0700, canfieldsteve@hotmail.com wrote:

>I'm getting ready to set up a new web site, and of course I'd like to
>avoid doing a lot of work that's already been done before.  I'm
>looking at the list of frameworks that are out there, but there are so
>many.  Perhaps someone here can recommend something for my needs.

Often mentioned are Catalyst, Maypole, Jifty.

>Here's what I need:
>
>- Basic authentication stuff: The site will require users to login and

I suppose all of the above three will have it.

>- Minimal magic: Let me code my way.  A lot of frameworks seem to be

The MVC pattern should not get into your way.

>- Easy install: The site I'm creating will eventually be released open

I heard stories about some Catalyst installing difficulties. But
OSness should not be a concern in any way.


CAVEAT: I have no *experience* in anything I wrote here. Just some
sparse reading.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Mon, 26 Mar 2007 18:46:19 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Seeking recommendation for Web framework
Message-Id: <m2slbr4o90.fsf@local.wv-www.com>

Michele Dondi <bik.mido@tiscalinet.it> writes:

> On 26 Mar 2007 14:34:39 -0700, canfieldsteve@hotmail.com wrote:
>
>>I'm getting ready to set up a new web site, and of course I'd like to
>>avoid doing a lot of work that's already been done before.  I'm
>>looking at the list of frameworks that are out there, but there are so
>>many.  Perhaps someone here can recommend something for my needs.
>
> Often mentioned are Catalyst, Maypole, Jifty.

IMHO, Catalyst is the cat's meow.

>>- Minimal magic: Let me code my way.  A lot of frameworks seem to be
>
> The MVC pattern should not get into your way.

Assuming, of course, that the "my way" the OP referred to is something
close to sensible. It's just not very realistic to expect a framework to
support every possible bizarre, twisted way of doing things.

>>- Easy install: The site I'm creating will eventually be released open
>
> I heard stories about some Catalyst installing difficulties.

Not so much difficult as tedious and time-consuming. It has a *long* list of
prerequisites, but none of them had any special difficulties installing the
last time I did the whole thing from scratch - which was less than a week
ago, on Mac OS X.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


------------------------------

Date: 27 Mar 2007 00:02:10 GMT
From: jt@toerring.de (Jens Thoms Toerring)
Subject: Re: Seeking recommendation for Web framework
Message-Id: <56r582F2atc45U1@mid.uni-berlin.de>

Sherm Pendley <spamtrap@dot-app.org> wrote:
> Michele Dondi <bik.mido@tiscalinet.it> writes:
> > On 26 Mar 2007 14:34:39 -0700, canfieldsteve@hotmail.com wrote:
> >
> >>I'm getting ready to set up a new web site, and of course I'd like to
> >>avoid doing a lot of work that's already been done before.  I'm
> >>looking at the list of frameworks that are out there, but there are so
> >>many.  Perhaps someone here can recommend something for my needs.
> >
> > Often mentioned are Catalyst, Maypole, Jifty.

> IMHO, Catalyst is the cat's meow.

I am also rather impressed with it. Drawback is the sometimes a bit
terse documentation - it would sometimes nice to have a real book
that comes with more examples and goes a bit more into details.
Expect to need a week or two until you feel more or less on top of
things (and then there will still remain a lot to be learned;-)

> > I heard stories about some Catalyst installing difficulties.

> Not so much difficult as tedious and time-consuming. It has a *long* list of
> prerequisites, but none of them had any special difficulties installing the
> last time I did the whole thing from scratch - which was less than a week
> ago, on Mac OS X.

Same here on Linux. Nearly nothing that didn't work easily with a
simple (but sometimes lengthy) install from CPAN, just a few extra
modules that needed fiddling with (forcing an install because some
of the test failed).
                               Regards, Jens
--
  \   Jens Thoms Toerring  ___      jt@toerring.de
   \__________________________      http://toerring.de


------------------------------

Date: Tue, 27 Mar 2007 04:55:23 GMT
From: nospam@geniegate.com (Jamie)
Subject: Re: Seeking recommendation for Web framework
Message-Id: <Lc1174948794195810x8c1758c@pong.podro.com>

In <1174944879.716311.182400@p15g2000hsd.googlegroups.com>,
canfieldsteve@hotmail.com mentions:
>I'm getting ready to set up a new web site, and of course I'd like to
>avoid doing a lot of work that's already been done before.  I'm
>looking at the list of frameworks that are out there, but there are so
>many.  Perhaps someone here can recommend something for my needs.

I know what you mean about there being so many I've looked at them
in the past as well.

>- Basic authentication stuff: The site will require users to login and
>out.  There should be your basic authentication stuff: a login form, a
>logout page, and an "I forgot my password" page.
>
>- Minimal magic: Let me code my way.  A lot of frameworks seem to be
>built on the idea that I should code the way the framework designers
>code.  I don't want to be forced into someone else's idea of The Right

If it weren't for the user authentication issue, I'd probably just 
recommend writing your own MVC, seriously. It's not hard and you'll end
up with exactly what you need and nothing else. I've written a few of them
and thus far have never regretted that approach.

If you can work out the authentication, I did a "controversial" blurb about
MVC's here: http://weird.podro.com/gouf/art/model_view_controlers_take_two/
(sorry for the crummy site, some day I'll get around to cleaning it up)

Basically, I feel the MVC is such a critical part of any application that
you probably should write it yourself (or at least, go in and literally
/chop out/ portions of someone elses that you don't need) 

I'm not pushing for it, but, you're certainly welcome to yank the packages
from that site, customize/strip them and call it your own.
(thus eliminating the need for your users to install anything) 

If you do that, you probably *should* strip out the junk you're not using in
the very beginning, it's always easier to add code than it is to remove it,
chopping it in the very beginning can help. I used Config::General, you 
may not like that. I've ripped the CGI::Session bit out in the past for
other projects.

Big frameworks carry big bloat, 80% of which you'll probably never use, 20% of
it could be done better if it were tailored for /your/ application. (Just
look at Java.. 60 billion frameworks, yet it's impossible to design a decent
termcap interface that handles SIGWINCH.)

Small frameworks are good, but probably won't operate in a manner that 
fits in with your design plans.

I'm not talking a cut-n-paste operation, doing that (without knowing what
it does) is silly and dangerous. I like code re-use as well (Heck, I love
the Config::General module!) 

MVC is more of an idea than a framework.

This really isn't intended as flame-bait, I completely respect anyone
who disagrees on this. (I suspect most people will)

Just my $0.02 I suppose if it had to use components from other programs I might
be a little less down on them, I don't hate them or anything, I just think
we've gone a little overboard with them.

Jamie
-- 
http://www.geniegate.com                    Custom web programming
Perl * Java * UNIX                        User Management Solutions


------------------------------

Date: Tue, 27 Mar 2007 09:55:03 +0200
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: Seeking recommendation for Web framework
Message-Id: <euaiv5$bt$1@mlucom4.urz.uni-halle.de>

canfieldsteve@hotmail.com wrote:
> Here's what I need:
> - Basic authentication stuff: The site will require users to login and
> out.  There should be your basic authentication stuff: a login form, a
> logout page, and an "I forgot my password" page.
> 
> - Minimal magic: Let me code my way.  A lot of frameworks seem to be
> built on the idea that I should code the way the framework designers
> code.  I don't want to be forced into someone else's idea of The Right
> Way. I also don't need or want a lot of features beyond the
> authentication stuff.  I actually find that the more a framework talks
> about how easy it will make my life, the more difficult it makes my
> life.
> 
> - Easy install: The site I'm creating will eventually be released open
> source.  I'd like to avoid telling potential users of my site that
> first they have to install some huge framework.  Really, I'd love it
> if the framework just consisted of just one or two modules that can be
> copied into one of the @INC directories and that's the whole install.
> 
> Any suggestions?

This has 5 characters and is spelled M.A.S.O.N, which is
not exactly a "web framework" but possibly a high level
tool for creating one. It installs without any problems
on any platform I came about.

If you have your content available and structured somehow,
you can hack together the web application w/MASON in almost
no time. It integrates perfectly into Apache infrastructure,
you can have it handle parts of your site or all of it.

There are 'inside out' [C]ontrollers which you can place
somewhere in the file system (autohandler and dhandler),
there are two good books available an even I managed
to set up a Web application while learning Perl in the
time (almost 1 1/2 year ago ...

Its has much of the Perl spirit, in my opinion.

That leaves the authentication question, which
you may completely separate from the app, by
moving it into some Apache2-Auth/DB handler.

Of course you may hack it in a short time into the
Mason appp by opening the Auth-DB first in an
<ONCE> ... </ONCE> statement and sending sha1-strings
back and forth (Browser) via cookies. Whatever ;-)

Regards

Mirco


------------------------------

Date: Tue, 27 Mar 2007 11:58:00 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Seeking recommendation for Web framework
Message-Id: <bjqh03pj137c3hhar49t8k2kk46589iasd@4ax.com>

On Mon, 26 Mar 2007 18:46:19 -0400, Sherm Pendley
<spamtrap@dot-app.org> wrote:

>> Often mentioned are Catalyst, Maypole, Jifty.
>
>IMHO, Catalyst is the cat's meow.

<ot>
Can you explain this idiom? I haven't heard it before, and I'm not a
native English speaker. I'm eager to know!  :-)
</ot>


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Tue, 27 Mar 2007 07:59:03 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: Seeking recommendation for Web framework
Message-Id: <m2zm5y28zc.fsf@local.wv-www.com>

Michele Dondi <bik.mido@tiscalinet.it> writes:

> On Mon, 26 Mar 2007 18:46:19 -0400, Sherm Pendley
> <spamtrap@dot-app.org> wrote:
>
>>> Often mentioned are Catalyst, Maypole, Jifty.
>>
>>IMHO, Catalyst is the cat's meow.
>
> <ot>
> Can you explain this idiom? I haven't heard it before, and I'm not a
> native English speaker. I'm eager to know!  :-)
> </ot>

Well, i can explain its meaning, but I don't know its origin for sure.

From what I can find, it's from the 1920s. A "cool cat" was someone who
kept up with all the latest fads and trends. The "cat's meow" was something
too cool for words.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


------------------------------

Date: Tue, 27 Mar 2007 15:08:41 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Seeking recommendation for Web framework
Message-Id: <iq5i0394kc0lrb2gv4sq4mmbehnj8jb0up@4ax.com>

On Tue, 27 Mar 2007 07:59:03 -0400, Sherm Pendley
<spamtrap@dot-app.org> wrote:

>Well, i can explain its meaning, but I don't know its origin for sure.
>
>From what I can find, it's from the 1920s. A "cool cat" was someone who
>kept up with all the latest fads and trends. The "cat's meow" was something
>too cool for words.

TY


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


------------------------------

Date: Tue, 27 Mar 2007 06:08:16 -0700
From: Xiong Changnian <please@nospam.net>
Subject: Sweetest Accessor?
Message-Id: <please-41DBC2.06081627032007@free.teranews.com>

I'm learning, so I'm trying different idioms. Perhaps in the end it 
doesn't matter but I've been working on particularly terse idioms. 

One particular demand is for object data accessor methods. There are a 
lot of them and they all look somewhat alike -- sounds like a demand for 
laziness. What's the shortest, "sweetest" accessor sub? 

Here's what I've got (eg): 

   METHOD1:

   sub name {
      my $obj        = shift; 
      $obj->{NAME}   = shift || 
      $obj->{NAME};
   };
   
This allows both gets and puts:

   $oldname = $obj->name;
   $obj->name ($newname);

It still doesn't satisfy me. The needless assignment-to-self irks. Note 
that it does no good to change the order of precedence so that 
$obj->{NAME} is returned (without assigning it) if shift tests false; by 
then it's too late and shift has clobbered the old value. So here I test 
shift within the right-hand side expression before making the 
assignment. 

Here's another: 

   METHOD2:

   sub name {
      $_[1] ? $_[0]->{NAME} = 
      $_[1] : $_[0]->{NAME};
   };

This avoids the needless assignment but now there's a second get of 
$_[1]. Supposing that the object is more complex and that hitting the 
object is more expensive than hitting the param, I'd guess this second 
version is more efficient. Also, no assignment to a temp $obj. It looks 
a bit odd to line break the statement after the assignment operator. 

I realize that some oppose needlessly terse or obscure code but I'll ask 
for forgiveness here. After all, an accessor method is simple. In the 
end, it's a wash anyway; I'm just experimenting. I'll take comments on 
either method shown and I'd love to see suggestions.
-- 
Xiong Changnian
xiong102ATxuefangDOTcom

-- 
Posted via a free Usenet account from http://www.teranews.com



------------------------------

Date: 27 Mar 2007 14:05:24 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Sweetest Accessor?
Message-Id: <56sml4F2758v9U1@mid.dfncis.de>

Xiong Changnian  <please@nospam.net> wrote in comp.lang.perl.misc:
> I'm learning, so I'm trying different idioms. Perhaps in the end it 
> doesn't matter but I've been working on particularly terse idioms. 
> 
> One particular demand is for object data accessor methods. There are a 
> lot of them and they all look somewhat alike -- sounds like a demand for 
> laziness. What's the shortest, "sweetest" accessor sub? 
> 
> Here's what I've got (eg): 
> 
>    METHOD1:
> 
>    sub name {
>       my $obj        = shift; 
>       $obj->{NAME}   = shift || 
>       $obj->{NAME};
>    };
>    
> This allows both gets and puts:
> 
>    $oldname = $obj->name;
>    $obj->name ($newname);
> 
> It still doesn't satisfy me. The needless assignment-to-self irks. Note 
> that it does no good to change the order of precedence so that 
> $obj->{NAME} is returned (without assigning it) if shift tests false; by 
> then it's too late and shift has clobbered the old value. So here I test 
> shift within the right-hand side expression before making the 
> assignment. 
> 
> Here's another: 
> 
>    METHOD2:
> 
>    sub name {
>       $_[1] ? $_[0]->{NAME} = 
>       $_[1] : $_[0]->{NAME};
>    };
> 
> This avoids the needless assignment but now there's a second get of 
> $_[1]. Supposing that the object is more complex and that hitting the 
> object is more expensive than hitting the param, I'd guess this second 
> version is more efficient. Also, no assignment to a temp $obj. It looks 
> a bit odd to line break the statement after the assignment operator. 
> 
> I realize that some oppose needlessly terse or obscure code but I'll ask 
> for forgiveness here. After all, an accessor method is simple. In the 
> end, it's a wash anyway; I'm just experimenting. I'll take comments on 
> either method shown and I'd love to see suggestions.

You have noticed one problem with your accessors (multiple assignment).
Another problem is that you won't be able to assign a boolean false
value that way.

The standard get-set accessor in Perl is

    sub name {
        my $obj = shift;
        $obj->{ name} = shift if @_;
        $obj->{ name};
    }

It hinges on the presence of two arguments, not on the value of the
second argument, so you can assign boolean false values, (including
undef).

For low-level read-write access I am partial to lvalue accessors
these days:

    sub name : lvalue { shift()->{ name} }

These are (usually) not for the class user (because you can't check
lvalues), but for your own use when you write the class code.  Give
them an initial "_" if you want to make that clear.  

Anno


------------------------------

Date: Tue, 27 Mar 2007 14:52:57 GMT
From: "Mumia W." <paduille.4060.mumia.w+nospam@earthlink.net>
Subject: Re: Sweetest Accessor?
Message-Id: <ddaOh.131662$_73.108653@newsread2.news.pas.earthlink.net>

On 03/27/2007 08:08 AM, Xiong Changnian wrote:
> I'm learning, so I'm trying different idioms. Perhaps in the end it 
> doesn't matter but I've been working on particularly terse idioms. 
> [...]

perldoc perltoot
perldoc Class::Struct
perldoc Class::Accessor




------------------------------

Date: Mon, 26 Mar 2007 08:14:54 -0500
From: hymie_@_lactose.homelinux.net (hymie!)
Subject: Re: time structure without shift
Message-Id: <6OedncSE84vTWprbnZ2dnUVZ_rWnnZ2d@comcast.com>

In our last episode, the evil Dr. Lacto had captured our hero,
  "Jürgen Exner" <jurgenex@hotmail.com>, who said:
>Michael Carman wrote:
>> UTC is another name for GMT.
>>
>>> If yes, then where is "time localized for the standard Greenwich
>>> time zone"?
>>
>> The value returned will be for what the local time would be in
>> Greenwich.

Not quite.

>That is exactly why I hate the term "GMT". Greenwich in England does 
>observer Daylight Saving Time aka Summer Time while UTC does not. Now, is 
>GMT the same as UTC or is GMT the local time in Greenwich? It can be either 
>or but not both. And depending on who you are talking to you will get either 
>answer.

GMT is the same as UTC.  The time in Greenwich is not necessarily GMT.

>Therefore I strongly, strongly advise against using the term "GMT" when 
>actually you are meaning "UTC".

That's a pet peeve of mine as well.  People here (Baltimore/Washington)
use the phrase "EST" to describe "local time in the Eastern Time Zone"
when not only is it incorrect for half of the year, but used to be very
confusing when some parts of the Eastern Time Zone did not switch to EDT.

hymie!        http://www.smart.net/~hymowitz        hymie@lactose.homelinux.net
===============================================================================


------------------------------

Date: Mon, 26 Mar 2007 15:08:12 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: time structure without shift
Message-Id: <wlRNh.3532$Qi2.1262@trndny07>

Ian Wilson wrote:
> Jürgen Exner wrote:
>> Now, is GMT the same as UTC or is GMT the local time in Greenwich?
>
> GMT is the same as UTC. For half the year, localtime in Greenwich is
> GMT.
>> It can be either or but not both.
>
> For half the year it *IS* both. In the winter, local time in Greenwich
> is GMT, in the summer the clocks (local time) are switched to BST. GMT
> remains the same all year round (and is almost identical to UTC).
>
> The Royal Observatory Greenwich says:
> "Throughout the winter months we will be using Coordinated Universal
> Time (almost identical to Greenwich Mean Time or GMT).

If even the observatory itself states that UTC is only _ALMOST_(*) identical 
to GMT, then why use GMT if you mean UTC?
It is simply good practice to avoid terms that can cause confusion.

jue

(*) For those curiously minded readers: GMT is averaged astronomical time 
while UTC is atomic time. Except for very specialized applications (e.g. to 
drive a telescope) all computers are using atomic time. 




------------------------------

Date: Tue, 27 Mar 2007 01:38:24 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: time structure without shift
Message-Id: <eu9m2r$192p$2@ns.felk.cvut.cz>

"Ian Wilson" <scobloke2@infotop.co.uk> píše v diskusním příspěvku 
news:46079d50$0$28973$da0feed9@news.zen.co.uk...
> $ perldoc -f gmtime
>    gmtime EXPR
>    Converts a time as returned by the time function to an 8-ele-
>    ment list with the time localized for the standard Greenwich
>    time zone.
>
> Maybe the word "localized" is confusing people?
**********************************************************
Bingo :-)
Maybe the right decription should be:

    gmtime EXPR
    Converts a EXPR time to an 8-element list.
    If parameter is omited then time() is used.

-- 

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail 
from another non-spammer site please.)




------------------------------

Date: Tue, 27 Mar 2007 11:12:17 +0100
From: Ian Wilson <scobloke2@infotop.co.uk>
Subject: Re: time structure without shift
Message-Id: <4608ee06$0$28969$da0feed9@news.zen.co.uk>

Jürgen Exner wrote:
> Ian Wilson wrote:
> 
>> Jürgen Exner wrote:
>> 
>>> Now, is GMT the same as UTC or is GMT the local time in
>>> Greenwich?
>> 
>> GMT is the same as UTC. For half the year, localtime in Greenwich
>> is GMT.
>> 
>>> It can be either or but not both.
>> 
>> For half the year it *IS* both. In the winter, local time in
>> Greenwich is GMT, in the summer the clocks (local time) are
>> switched to BST. GMT remains the same all year round (and is almost
>> identical to UTC).
>> 
>> The Royal Observatory Greenwich says: "Throughout the winter months
>> we will be using Coordinated Universal Time (almost identical to
>> Greenwich Mean Time or GMT).
> 
> 
> If even the observatory itself states that UTC is only _ALMOST_(*)
> identical to GMT,

GMT is mean solar time at the prime meridian. AFAIK this is exactly what
UT1 is (corrected for polar rotation).

If I've correctly digested the pleasant half hour I spent last night
reading Wikipedia, UTC approximates to GMT / UT1 by being "corrected" by
the addition of leap seconds. The difference is never allowed to exceed 0.9s

UT1 is for people who don't like discontinuities in time but don't mind 
that all seconds are not equal in duration. UTC is for people who need 
their seconds to be consistent but don't mind seconds dissapearing or 
the same second occuring twice in a row. Mariners probably prefer UT1 
because UTC can mean being 4 Km adrift of where you thought you were.

> then why use GMT if you mean UTC?

People rarely know what they mean when it comes to timezones. I'm not
sure I do. Most people don't care about the workings of the Earth
Rotation Service, DUT or any of the other issues above. So, for most 
people, GMT and UTC mean the same thing.

> It is simply good practice to avoid terms that can cause confusion.

All of TAI UTC UT0 UT1 UT1R UT2 UT2R GMT BST etc cause confusion. We
can't avoid using at least one or two of them though.

The word/phrase "timezone" has two distinct meanings in common usage, we 
can't avoid using that word either. Confusion results. I am currently in 
the GMT timezone. I am simultaneously in the BST timezone. For different 
meanings of timezone.

Maybe gmtime() should be renamed utimec() :-)
Though I think that would just increase confusion!

> (*) For those curiously minded readers: GMT is averaged astronomical
> time while UTC is atomic time. Except for very specialized
> applications (e.g. to drive a telescope) all computers are using
> atomic time.

Atomic time is TAI, which is not UTC. Most computers are embedded in 
toasters, refrigerators, digicams, ipods etc and are probably using 
their own internal clocks which are nothing like TAI or UTC. Most PCs 
also use their own innacurate internal clocks, corrected once a day to 
roughly match UTC. Most servers probably use NTP and so might track UTC 
within a few milliseconds (less if you're fortunate). I wouldn't 
characterise the above situation as all computers using TAI. NTP is the 
most accurate but it departs from the principles of TAI quite 
considerably because it compensates for drift every few seconds, so 
consecutive seconds may differ in duration, unlike TAI seconds.

Anyway, I'm just being argumentative ;-) I think we pretty much agree 
about the practicalities. The OP needed to use gmtime(). If the perldocs 
said "localized to UTC" he might still have suffered the same confusion 
about what "localized" means in that sentence.


------------------------------

Date: 27 Mar 2007 02:30:35 -0700
From: "vabby" <vaibhav.aparimit@gmail.com>
Subject: using ftp from perl script
Message-Id: <1174987835.599511.264640@o5g2000hsb.googlegroups.com>

Hi
I need to use ftp from perl script. below is the script.

#!/opt/perl-5.600/bin/perl
use strict;

use Carp;
use Socket;
use FileHandle;
use File::Basename;
use File::Path;
use Sybase::DBlib;
print "FTP sequence initiated\n";

my $host = 'destination.remoste.host.com';
my $usr = ''user_name';
my $pass = 'passwd';
my $file = 'ftpfile.txt';
`ftp -n $host >/home/apariv/perl_learning/ftp.log <<END_SCRIPT`;
`user $usr`;
`$pass`;
`lcd /home/apariv/perl_learning`;
`put $file`;
`quit`;
#END_SCRIPT

the script runs fine w/o any error.ftp.log file remains empty and
there is no file copied to the remote host. can u plz help m efind out
the error.



------------------------------

Date: Tue, 27 Mar 2007 11:17:15 +0100
From: Ian Wilson <scobloke2@infotop.co.uk>
Subject: Re: using ftp from perl script
Message-Id: <4608ef2c$0$27120$db0fefd9@news.zen.co.uk>

vabby wrote:
> Hi
> I need to use ftp from perl script. below is the script.
> 
> #!/opt/perl-5.600/bin/perl
> use strict;
> 
> use Carp;
> use Socket;
> use FileHandle;
> use File::Basename;
> use File::Path;
> use Sybase::DBlib;
> print "FTP sequence initiated\n";
> 
> my $host = 'destination.remoste.host.com';
> my $usr = ''user_name';
> my $pass = 'passwd';
> my $file = 'ftpfile.txt';
> `ftp -n $host >/home/apariv/perl_learning/ftp.log <<END_SCRIPT`;

You can't use HERE documents (your <<END_SCRIPT) in backquotes like that.

> `user $usr`;

This is executed as a separate command because it is in separate 
backquotes. You are way off track.

> `$pass`;
> `lcd /home/apariv/perl_learning`;
> `put $file`;
> `quit`;
> #END_SCRIPT

That should not have the hash-mark at the beginning.

> 
> the script runs fine w/o any error.ftp.log file remains empty and
> there is no file copied to the remote host. can u plz help m efind out
> the error.
> 

I strongly suggest you search CPAN for an FTP module, read it's 
documentation and use it.


------------------------------

Date: 27 Mar 2007 04:00:32 -0700
From: "vabby" <vaibhav.aparimit@gmail.com>
Subject: Re: using ftp from perl script
Message-Id: <1174993232.431695.265120@e65g2000hsc.googlegroups.com>

tx for the reply . CPAN ftp module is gr8 and has solved my problem



------------------------------

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 V11 Issue 272
**************************************


home help back first fref pref prev next nref lref last post