in reply to Exporting forcibly and optionally, can both be done ?

Let's see what the documentation for Exporter has to say...
Specialised Import Lists If the first entry in an import list begins with !, : or / then the list is treated as a series of specifications which either add to or delete from the list of names to import. They are processed left to right. Specifications are in the form: [!]name This name only [!]:DEFAULT All names in @EXPORT [!]:tag All names in $EXPORT_TAGS{tag} anonymous li +st [!]/pattern/ All names in @EXPORT and @EXPORT_OK which m +atch A leading ! indicates that matching names should be deleted from the list of names to import. If the first specification is a deletion it is treated as though preceded by :DEFAULT. If you just want to import extra names in addition to the default set you will still need to include :DEFAULT explicitly.
The last sentence there reveals the solution. To import all the @EXPORT names and some @EXPORT_OK names, you would do something like this: use testpack qw(:DEFAULT &rtine);

Replies are listed 'Best First'.
Re: Re: Exporting forcibly and optionally, can both be done ?
by Anonymous Monk on Jun 21, 2001 at 20:28 UTC
    Thanks for your reply. Using :DEFAULT works. I'm kinda new to perl. I had read that documentation, many times actually. But it's not exactly easy to grasp and after a few hours inverting variables, you mind gets screwed. Thx again. Philippe.