Damian Conway wrote:
> 
>    > What is:
>    >
>    >   $x = date();
>    >
>    > going to return?
> 
> Probably the current scalar context result (i.e. a date string)
> 
>    > An object that has many different -ify methods:
>    >   stringify
>    >   numify
>    >   hashify
>    >   listify
>    >   objectify (!)
> 
> Possible, but blech.


Why is that more blech?  if the function has to return
something different depending on wantgenericscalar, wantarray,
wantinteger or wantfloat being set, it might be just as easy
to return a closure that will defer making up its mind about
this as long as possible.

if date() returns an object of type date, which is just like
a big integer except it stringifies into localtime(this) instead
of sprintf("%i",this) where's the blech in that?
 

-- 
                          David Nicol 816.235.1187 [EMAIL PROTECTED]
Who moved mmy blech?

Reply via email to