in reply to Code Reuse

A use is basically a require plus a call to the import sub of the included package.

And import is executed in the context of the calling package.

Thus you can call other imports inside a generic import to export into the calling namespace.

For instance:

package generic; use strict; # * ... sub import { strict->import(); ... }

You might wanna have a look into the source of Modern::Perl for more examples.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Update

*) Had to change require strict; to use strict; to make it work. (not sure why)

Answer

It's a timing issue, the require has to happen in a BEGIN or inside the import (use does it automatically), this works

package generic; sub import { require strict; strict->import(); ... } 1;