Re: code line of the day

2006-09-07 Thread A. Pagaltzis
* Uri Guttman <[EMAIL PROTECTED]> [2006-09-07 09:30]: > this line of my code grew to its present form which i find amusing. > > @{$self->{templates}}{ keys %{$tmpls} } = > map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %{$tmpls} ; my ( $k, $v ); $self->templates->{

Re: code line of the day

2006-09-07 Thread Chris Palmer
Uri Guttman writes: > @{$self->{templates}}{ keys %{$tmpls} } = > map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %{$tmpls} ; > > discuss amongst yourselves. topics include: what does it do? wtf am i > doing that? and general esthetics. I think you meant to post this to the

Re: code line of the day

2006-09-07 Thread John Douglas Porter
"Randal L. Schwartz" wrote: > At one point, I'm sure it returned undef on a non-reference. > > Maybe I'm getting too old. I concur with Randal. I early on got in the habit of extra testing to avoid this warning. I'm glad I don't have to anymore... -- John Douglas Porter _

Re: code line of the day

2006-09-07 Thread Smylers
Randal L. Schwartz writes: > > "Ronald" == Ronald J Kimball <[EMAIL PROTECTED]> writes: > > Ronald> Why would it throw warnings? ref() returns empty string if > Ronald> the argument isn't a reference. > > At one point, I'm sure it returned undef on a non-reference. reftype in Scalar::Util

Re: code line of the day

2006-09-07 Thread Randal L. Schwartz
> "Ronald" == Ronald J Kimball <[EMAIL PROTECTED]> writes: Ronald> Why would it throw warnings? ref() returns empty string if the argument Ronald> isn't a reference. At one point, I'm sure it returned undef on a non-reference. Maybe I'm getting too old. -- Randal L. Schwartz - Stonehenge

Re: code line of the day

2006-09-07 Thread Uri Guttman
> "BL" == Bart Lateur <[EMAIL PROTECTED]> writes: BL> On Thu, 07 Sep 2006 03:29:02 -0400, Uri Guttman wrote: >> this line of my code grew to its present form which i find amusing. >> >> @{$self->{templates}}{ keys %{$tmpls} } = >> map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %

Re: code line of the day

2006-09-07 Thread Uri Guttman
> "RLS" == Randal L Schwartz writes: > "Uri" == Uri Guttman <[EMAIL PROTECTED]> writes: Uri> @{$self->{templates}}{ keys %{$tmpls} } = Uri> map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %{$tmpls} ; Uri> discuss amongst yourselves. topics include: what does it do? RLS> Uh, it

Re: code line of the day

2006-09-07 Thread Bart Lateur
On Thu, 07 Sep 2006 03:29:02 -0400, Uri Guttman wrote: >this line of my code grew to its present form which i find amusing. > > @{$self->{templates}}{ keys %{$tmpls} } = > map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %{$tmpls} ; > >discuss amongst yourselves. topics inclu

Re: code line of the day

2006-09-07 Thread Ronald J Kimball
On Thu, Sep 07, 2006 at 07:21:07AM -0700, Randal L. Schwartz wrote: > > "Uri" == Uri Guttman <[EMAIL PROTECTED]> writes: > > Uri> @{$self->{templates}}{ keys %{$tmpls} } = > Uri> map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %{$tmpls} ; > > Uri> discuss amongst yourselves. topic

Re: code line of the day

2006-09-07 Thread Randal L. Schwartz
> "Uri" == Uri Guttman <[EMAIL PROTECTED]> writes: Uri>@{$self->{templates}}{ keys %{$tmpls} } = Uri>map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %{$tmpls} ; Uri> discuss amongst yourselves. topics include: what does it do? Uh, it throws a lot of warnings when values(%$t

code line of the day

2006-09-07 Thread Uri Guttman
this line of my code grew to its present form which i find amusing. @{$self->{templates}}{ keys %{$tmpls} } = map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %{$tmpls} ; discuss amongst yourselves. topics include: what does it do? wtf am i doing that? and general esthe