Pollute, Pollute::Persistent - build include files that use modules indirectly
Pollute - Perl extension to re-export imported symbols Pollute::Persistent - Better Perl extension to re-export imported symbols
use Pollute; use This; use That; use TheOther; Pollute; # exports anything imported from This, That or TheOther
use Pollute::Persistent; use This; use That; use TheOther; # use of this module exports anything imported from This, That or TheOther
On use, all the symbols in the caller's symbol table are listed into %Pollute::Before, and the Pollute subroutine is exported (through direct symbol table manipulation, not through "Exporter.") After importing various things, run Pollute to export everything you imported since the C<use Pollute> line into the calling package. Pollute::Persistent does the same thing, but using lexicals instead of package variables. Instead of requiring an explicit call to "Pollute" Pollute::Persistent clobbers the import subroutine, meaning that you can create "include file files" by using Pollute::Persistent
Pollute function, which pollutes its caller
with the symbols which appear in the symbol table but do
not appear in %Before.
Pollute::Persistent clobbers the calling package's
and is suitable for recursive use.
David Nicol, <lt>firstname.lastname@example.org<gt>
The name was suggested by Garrett Goebel. I was going to call it "ImportExport."