Avoid creating @EXPORT_FAIL in every package using Exporter.
authorNicholas Clark <nick@ccl4.org>
Thu, 17 Jun 2010 14:21:24 +0000 (15:21 +0100)
committerNicholas Clark <nick@ccl4.org>
Thu, 17 Jun 2010 14:21:24 +0000 (15:21 +0100)
commit2d7e78b1bd24d3af5881f95a996405c9c11b1d59
treeb360e40d9e201feda121a3a9e54b497c18f404b8
parent79a921544258c0f3466f44738c4f0d24399782dd
Avoid creating @EXPORT_FAIL in every package using Exporter.

Previously, if package INKLE_KLINK is an Exporter, then the Exporter code's
symbolic lookup of \@{"INKLE_KLINK::EXPORT_FAIL"} would cause both that array
and the enclosing typeglob to be instantiated. Now the typeglob and array are
only created if present. (Strictly, if there's something in INKLE_KLINK's
symbol table for EXPORT_FAIL. But likely that will only ever be the array.)

This saves about 200 bytes per package that uses Exporter but does not need an
@EXPORT_FAIL.
lib/Exporter.pm