From: Mattia B. <mat...@li...> - 2006-08-16 19:15:37
|
On Wed, 16 Aug 2006 20:51:53 +0200 "Mark Wardell" <ma...@ne...> wrote: Hello, > I understand Exporter and EXPORT and EXPORT_OK but I cannot see how these > are used in the other wxPerl modules. There is no magic: you inherit from Exporter and set up @EXPORT_OK (and %EXPORT_TAGS, if you need). In wxPerl the inheritance is in Wx.pm and the EXPORT_XXX setup in Wx::Wx_Exp (which is autogenerated, but this does not change anything). Then there is xx_constants.cpp, which defines a function for mapping names into constants and a wxPlConstants object to register it with the main wxPerl AUTOLOAD sub, but the error you see is caused by incorrect use of Exporter: in the package you do not populate EXPORT_OK and do not inherit from Exporter. Oh, and please do not use Wx::Mini: it is an implementation detail. Regards Mattia |