in reply to Re: Is "ref $date eq 'ARRAY'" wrong?
in thread Is "ref $date eq 'ARRAY'" wrong?

By using isa() you've just allowed your users to bless their arrays before giving them to you.
Is that a good thing? You are suddenly going to accept object and depend on its internals. Not touching the internals of foreign objects (what the original code is doing) is IMO a good thing.

Abigail

Replies are listed 'Best First'.
Re: Re: Is "ref $date eq 'ARRAY'" wrong?
by diotalevi (Canon) on Dec 19, 2003 at 18:26 UTC
    Sure it is. You advertised that you accept array references it shouldn't matter to you what someone else thinks of that array. If someone else has an object and they think that its fine for someone else to treat their object as a plain array then it isn't a problem for the isa-using function author to do so.