On Sun, Aug 06, 2000 at 04:54:03AM +1000, Damian Conway wrote:
>    > =head1 TITLE
>    > 
>    > Positional Return Lists Considered Harmful
>    > 
>    > The solution is simple: return hashes instead of lists.  Yes, one
>    > still has to know how the fields are named, so the proposed solution
>    > is still not perfect.
> 
> I *fully* support this idea. A suggestion though:
> 
>       return hash (references) *as well as* lists.

In a version 2 which I just sent to the librarian I also muse
that the whole get*() might just simply stink and tied hashes
(or hash refs, now that you mention it) might be much more natural
interface.

        use Users;

        my $u = {};

        tie $u, 'Users';

        if (exists $u->{damian}) { system ("rm -rf $u->{damian}->{home}") }

Just as a fictional example, of course :-)

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Reply via email to