develooper Front page | perl.perl5.porters | Postings from October 2011

[perl #101976] [PATCH] Remove cruft from the module example

Thread Previous
From:
Father Chrysostomos via RT
Date:
October 23, 2011 13:53
Subject:
[perl #101976] [PATCH] Remove cruft from the module example
Message ID:
rt-3.6.HEAD-31297-1319403229-977.101976-15-0@perl.org
On Sun Oct 23 13:05:41 2011, LeonT wrote:
> On Sun, Oct 23, 2011 at 9:50 PM, Father Chrysostomos via RT
> <perlbug-followup@perl.org> wrote:
> > The problem with that is the lack of introspection.  With inheritance,
> > one can say Class->isa("Exporter") and, if it returns true, read
> > @EXPORT* and %EXPORT_TAGS to find out what is exported.
> >
> > Without ->isa("Exporter"), there’s no guarantee that what is in those
> > variables has anything to do with Exporter.
> 
> Relying on such an implementation detail is broken anyway. It we
> wanted that to work we should have never allowed «use Exporter
> 'import'». That ship has sailed a long time ago, for very good
> reasons. Besides, if you really want it you can check if
> $package->can('import') is really Exporter::import or some such.

Pity....


Thread Previous


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