http://www.perlmonks.org?node_id=695756


in reply to Re^4: Automatically importing a subroutine for a particular namespace
in thread Automatically importing a subroutine for a particular namespace

Note that you would have to take care that the exporting takes place at the right time (which would be before the packages are loaded) if you want to have the same semantics as my solution. That's completely possible, of course (at least if you're not making it too complicated), but it may lead to confusion and/or spurious warnings if you're doing it wrong.

  • Comment on Re^5: Automatically importing a subroutine for a particular namespace