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

Re: [PATCH] UNIVERSAL shouldn't require Exporter

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
April 26, 2001 12:56
Subject:
Re: [PATCH] UNIVERSAL shouldn't require Exporter
Message ID:
20010426145630.Z9141@chaos.wustl.edu
On Thu, Apr 26, 2001 at 02:22:40PM +0100, Mike Guy wrote:
> barries <barries@slaysys.com> wrote
> >      `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.
> >      Example
> >
> >	 use UNIVERSAL qw(isa);
> >
> >	 if(isa($ref, 'ARRAY')) {
> >	     #...
> >	 }
> 
> Oh rats.    That should have been mended when this was added to UNIVERSAL.pm
> back in perl5.004_01:
> 
>      These subroutines should not be imported via
>      "use UNIVERSAL qw(...)".  If you want simple local access to
>      them you can do
> 
>        *isa = \&UNIVERSAL::isa;
> 
>      to import isa into your package.
> 
> So the attached patch should be applied to perl5.004_01.
> (Actually, it works nicely on bleadperl as well.   :-)

So it does.  Thanks, applied.

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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About