[I might join perl6-language some day, but until then, please CC me on all
Time::Object related messages]
<Original from="Bart Lateur">
On Wed, 2 Aug 2000 08:14:22 +0100 (BST), Matt Sergeant wrote:
>I used to be a C programmer myself (well OK, I was a C++ programmer...),
>but I'd rather any day type "localtime->year" than "(localtime)[5]".
And what would you type instead of
(localtime)[3, 4, 5]
? localtime->(day, month, year) ?
</Original>
<Reply>
I'd either leave that as (localtime)[3,4,5] (please read the man page for
Time::Object), or understand that there's absolutely no need to separate
off the variables like that in an object oriented interface:
my ($day, $month, $year) = (localtime)[3,4,5];
becomes:
my $date = localtime;
And use $date->day (or month or year) later when you need to.
</Reply>
--
<Matt/>
Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org
- Re: Stuff in core (was Re: d... Dan Sugalski
- Re: date interface (was Re: perl6 req... Nick Ing-Simmons
- Re: date interface (was Re: perl6 require... J. David Blackstone
- Re: date interface (was Re: perl6 req... Bryan C . Warnock
- Memory Footprint of Perl System Calls... mooring
- Re: date interface (was Re: perl6 requirement... Nathan Torkington
- Re: date interface (was Re: perl6 require... Chaim Frenkel
- Re: date interface (was Re: perl6 req... Dan Sugalski
- Re: date interface (was Re: perl... Chaim Frenkel
- Re: date interface (was Re: perl6 requirement... Damian Conway
- Re: date interface (was Re: perl6 requirements, on boo... Matt Sergeant
- Re: date interface (was Re: perl6 requirements, o... Hildo Biersma
- Re: date interface (was Re: perl6 requirement... Matt Sergeant
- wanthash (Was: Re: date interface (was Re: pe... Johan Vromans
- Re: wanthash (Was: Re: date interface (wa... Tom Christiansen
- Re: wanthash (Was: Re: date interface... Johan Vromans
- Re: wanthash (Was: Re: date interface... Damian Conway
- Re: wanthash (Was: Re: date inte... Piers Cawley
- Re: wanthash Dan Sugalski
- Re: wanthash Peter Scott
- Re: wanthash Graham Barr
