develooper Front page | perl.perl6.language | Postings from July 2001

Re: nice2haveit

From:
David L. Nicol
Date:
July 13, 2001 19:30
Subject:
Re: nice2haveit
Message ID:
3B4FAD06.214573A8@kasey.umkc.edu
raptor wrote:
> 
> > Yes but can't the same be accomplished with...
> >
> > my $myhash = (%{$Request->{Params}});
> > print $myhash{abc};
> >
> > Though again it copies the structure, I don't see how dereferencing can be
> > unclear?
> 
> ]- if u have someting like this anything u can remove in some way is worth
> it....:))
> 
> $tables{$$self{rel}{$k}{table}}[0][VALS]
> or this :
> $$params{$$self{rel}{$k}{names}[$t].$j}
> 
> especialy if U have a couple of this ....:") in 3-4 rows of code...
> 
> =====
> iVAN
> raptor@unacs.bg
> =====

This is the sort of situation I devised "it" for.  When you are
suppressing autovivification yourself, and checking the validity
of many references in a row.

I think "it" (a function that maintains a soft reference to
whatever was the last object of either C<defined> or C<exists>)
would make a better Special Variable than a Function but I couldn't
figure out how to write a Special Variable in the two days I wrote
the hack in.

If someone is actually using "the it hack" that would be a kick.




-- 
                                           David Nicol 816.235.1187
                      Irish Government Warning: SMOKERS DIE YOUNGER




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About