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

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

Thread Previous
Father Chrysostomos via RT
October 23, 2011 13:53
[perl #101976] [PATCH] Remove cruft from the module example
Message ID:
On Sun Oct 23 13:05:41 2011, LeonT wrote:
> On Sun, Oct 23, 2011 at 9:50 PM, Father Chrysostomos via RT
> <> 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.


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