Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re (tilly) 2: ref, no, maybe?

by tilly (Archbishop)
on Jan 11, 2001 at 06:08 UTC ( [id://51059] : note . print w/replies, xml ) Need Help??


in reply to (tye)Re: ref, no, maybe?
in thread ref, no, maybe?

Note that even UNIVERSAL::isa is not perfect.

What happens if someone decides to create a package called ARRAY?

At some point you have to assume some reasonableness on the part of the programmer using your library...

Replies are listed 'Best First'.
(tye)Re3: ref, no, maybe?
by tye (Sage) on Jan 11, 2001 at 06:16 UTC

    What happens if someone decides to create a package called ARRAY?

    Then they deserve to be flogged and banned from CPAN and have no right to complain if anyone's code breaks with their stuff. Did you expect anything different?

    There are other cases like this. I'd rather that there weren't, but you can't expect things to work if you have packages named SUPER or CORE either. In fact, I've never seen an all-caps package name.

    Update: mdillon was kind enough to remind that I actually have seen a few all-caps package names. He mentioned B and O and I'll add DB. These are all examples of horrid package names. Anyone who doesn't already know care to guess what any of these are for? mdillon also mentioned DBI and CGI. Well, those are reasonably named modules. But I reserve the right to shoot anyone who makes a module whose name is an ALL-CAPS word. ;)

            - tye (but my friends call me "Tye")