develooper Front page | perl.perl5.porters | Postings from March 2003

pseudohashes deprecation

Thread Next
Jarkko Hietaniemi
March 9, 2003 23:26
pseudohashes deprecation
Message ID:
I think the thread sort of died ... but I seem to remember seeing some
discussion about the deprecation (or not) of pseudohashes (and if, how).
Since I'm starting to ramp up for 5.8.1-RC1, I really would like to know
what is the general feeling about the matter.

What currently happens in maintperl is that if one accesses the
pseudohash constructs, one gets a warning:

	$ ./perl -wle '$a=[{foo=>1,bar=>2},12,34];print $a->{bar}'
	Pseudo-hashes are deprecated at -e line 1.

Creation of pseudohashes does not warn since that's one of the major
gripes about the whole feature: if you *do* want to create a data
structure that has the same structure as a pseudohash (would) but do
*not* want Perl to interpret it as a pseudohash.  (Not that for
5.8.1 it helps that much: Perl still does implement pseudohashes.)

Also remember that the 5.8.0 didn't have this deprecation warning and
this was considered an oversight: a feature shouldn't be deprecated
without an added warning (not all people read perldelta as carefully
as they should).  Hence the added warning for 5.8.1.

Jarkko Hietaniemi <> "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About