develooper Front page | perl.perl6.language | Postings from December 2001

Re: Perl 6's Exporter

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
December 24, 2001 08:15
Subject:
Re: Perl 6's Exporter
Message ID:
20011224161555.GA24299@blackrider
On Mon, Dec 24, 2001 at 01:11:21PM +0000, Nicholas Clark wrote:
> > > 4. For modules, saying 'use Exporter' should be enough to get import.
> > >    If you don't want Exporter's import(), just C<use Exporter()>.
> > 
> > Very nice.  Exporter::Lite does just that.
> 
> What actually stops us retrofitting that onto perl5's exporter?

If we did everyone would still say "@ISA = qw(Exporter)" to be
backwards compatible, so I don't know what the benefits would be.

Also it would cause "subroutine redefined" warnings in this sort of
code:

    use Exporter;
    sub import {
        ...
        Exporter::export_to_level(...);
    }


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Perl Quality Assurance	    <perl-qa@perl.org>	       Kwalitee Is Job One
Plus I remember being impressed with Ada because you could write an
infinite loop without a faked up condition.  The idea being that in Ada
the typical infinite loop would be normally be terminated by detonation.
	-- Larry Wall in <199911192212.OAA23621@kiev.wall.org>

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