@EXPORT, @EXPORT_OK, and @EXPORT_FAIL are described in some detail in the perl documentation: see exporter.
@ISA is used to store the super classes of a class. For more information, on @ISA see perltoot.
Briefly, here's how the two fit together:
- @EXPORT stores the list of subroutines that are exported automatically whenever a user includes the module using use. Exporting lets you use subroutines without the full package qualification: so instead of Toys::Weeble::wobble(...) you can just use wobble(...). However, generally it is not a good idea to export things automatically. It can cause clashes with the names of subroutines in any code that uses your module.
- @EXPORT_OK stores the list of subroutines that can be optionally exported. Those who want to omit the package qualifier from the subroutine name can request the functions to be exported, by adding parameters to the use statement, like this: use Toys::Weeble qw(wobble wontFallDown);
- @EXPORT_FAIL are things you don't want exported. If a module tries to export any subroutine in that list, an error will be generated.
The actual exporting is done by a subroutine named import(...). It processes @EXPORT etc. It also takes the parameters to use and processes them. There is a default definition for it, so unless you want to do something special, you can pretty much forget about it and let the default subroutine do its thing. To get access to the default definition, you need to make your module a subclass of Exporter, hence the @ISA statement.
Best, beth
Update added explanation of how @ISA and @EXPORT etc work together.