develooper Front page | perl.perl5.porters | Postings from January 2000

Re: On Pseudohashes

Nick Ing-Simmons
January 16, 2000 14:15
Re: On Pseudohashes
Message ID:
Tom Christiansen <> writes:
>    * Compile-time detection of the validity of $obj->attribute()
>      in addition to just $obj->{"attribute"}.  In the general case,
>      this lies somewhere between hard and impossible.  

How so? In both cases you have to "know" what class $obj is/can be.

my Dog $spot;

Gives as much or as little information to either. 


You either look in $Dog::FIELDS{'name'} or CV of $Dog::{'name'} 
(Perhaps %FIELDs should have been part of the stash ...)

Nick Ing-Simmons Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About