develooper Front page | perl.perl5.porters | Postings from April 2001

Re: [PATCH] UNIVERSAL shouldn't require Exporter

Thread Previous | Thread Next
April 26, 2001 01:54
Re: [PATCH] UNIVERSAL shouldn't require Exporter
Message ID:
On Thu, Apr 26, 2001 at 07:05:10AM +0100, Graham Barr wrote:
> There should not be an import{} method at all.

Cat's out of the bag on this on, I think.  Quoth perlobj:

     `isa' is also exportable and can be called as a sub with two argu-
     ments. This allows the ability to check what a reference points to.

	 use UNIVERSAL qw(isa);

	 if(isa($ref, 'ARRAY')) {

It can be handy to be able to call isa() and can() without worrying if
the "object" is blessed.  Why shouldn't isa() be imported, anyway?

- Barrie

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About