March 2011 Archives

Exporter-Declare, exporting for modern Perl.

Exporting can be achieved through several routes. You can do it manually through typeglob manipulation, or you can use one of several modules that do it for you. One of the most proliferated, and common is the Exporter.pm module. More recently there have been some advances in the form of Sub::Exporter and similar improved exporting tools.

Exporter.pm is good in that it has a simple interface, is found in any perl installation, and is proven to get the job done. On the other hand it shows it's age; You specify exports in a package variable, and it can be difficult to work in custom imp…

About Chad 'Exodist' Granum

user-pic I blog about Perl.