On Wed, Aug 09, 2000 at 12:09:42PM -0600, Nathan Torkington wrote:
> Dan Sugalski writes:
> > stat makes some sense. (local|gm)time makes some sense. The socket
> > functions make some sense. The message and shared memory functions make
> > some sense. Basically most of the 'advanced' functions make some sense.
> > That's the problem--they all make some sense, which is a lot of code to get
> > right for the .0 release.
>
> stat, sockets, messaging, and the rest of the advanced stuff should
> probably go to modules. (local|gm)time belongs in the core, but
> probably not as an object.
>
> I want the core to stay useful but not complex. If localtime returned
> a hashref in scalar context, that'd be enough for me:
>
> $now = localtime;
> print $now->{MONTH};
> print $now->{YEAR}; # already has 1900 added onto it :-)
> print $now->{INTEGER}; # epoch seconds value
$now->{EPOCH_SECONDS}
$now->{ISO8601} # YYYY-MM-DDThh:mm:ss
# YYYY-MM-DDThh:mm:ss[-+]hh:mm if offset known
# YYYY-MM-DDThh:mm:ssZ from gmtime()
$now->{JULIAN} # to make date arith easier
> To get what is now scalar localtime, you'd say
>
> print localtime->{STRING};
>
> In list context it would return a simple list of values as it does now.
>
> RFC 48 is way too complex for my liking. In particular it expects
> Perl to be able to distinguish between assignment to array and to a
> hash.
>
> I smell a counter-RFC, or at least a mailing list on which to thrash
> this out.
>
> Nat
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen