"For some reason, the CGI.pm author didn't realise that hashes are the most natural way of providing key/value-based information."
in reply to Re: How do you replace variables in an external string?
in thread How do you replace variables in an external string?
Actually, I'm pretty sure Lincoln knew that. I'm also sure that Lincoln wanted the object interface to deal with assignment to the argument set as well as reading it. He tied the hash from Vars later so you could have hash-like access but the first iterations of CGI predate tied hashes.
And, BTW, he also has this note in the man pages:
When using this, the thing you must watch out for are mul-
tivalued CGI parameters. Because a hash cannot distin-
guish between scalar and list context, multivalued parame-
ters will be returned as a packed string, separated by the
"\0" (null) character. You must split this packed string
in order to get at the individual values. This is the
convention introduced long ago by Steve Brenner in his
cgi-lib.pl module for Perl version 4.
$you = new YOU;
honk() if $you->love(perl)