--DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable
An entity claiming to be Rob Partington ([EMAIL PROTECTED]) wrote: :=20 : In message <[EMAIL PROTECTED]>, : [EMAIL PROTECTED] (Randal L. Schwartz) writes: : > Otherwise, { not ref($foo) or UNIVERSAL::isa($foo,"IO::File") } will : > tell if it is "openable". =20 :=20 : That fails for things like IO::Scalar, doesn't it?=20 :=20 : Wouldn't it be better to say "if it's a scalar, it's a file; if it's a : ref, it's something that has open, close, write, etc. methods and we use : those"? That's a simple change to: { not ref($foo) or UNIVERSAL::isa($foo,"IO::Handle") } Of course, you never know with IO::* inheritance. Mark --=20 [] | Beware of bugs in the above code; [] Mark 'Doc' Rogaski | I have only proved it correct, not tried it. [] [EMAIL PROTECTED] | -- Donald Knuth [] | --DocE+STaALJfprDB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8f6S7Tt0KXgQukDQRAqwZAKCoN0iWfPEYg1WOy7u2IzjmZBtHWwCfdqRp XxyL+XwDdQWNzQH5+4QmXHo= =Z+uA -----END PGP SIGNATURE----- --DocE+STaALJfprDB--