All Modules will be able to turn on or off the Garbage Collector for itself, and be able to suspend the Garbage collector on behalf any module, or even globally.
Modules will also be able to select which Garbage Collector gets used for objects that it generates.
The Garbage Collector will be turned on by default for every package, but no Garbage Collector in particular will be selected.
use GC;
use GC 'any';
If the program selects a particular GC to use, it will be used by any modules that doesn't specify which GC it will use.
use GC 'system';
use GC GC::system;
A module will be able to turn off all GC's, for itself. The reason for this is that a programmer could then write a GC as a module.
no GC;
Doing a no GC; inside of a block will turn it off for that block
All GC's will be required to handle self referencial data structures correctly.
Whenever the GC is turned off the compiler will make sure an object is deleted when the block is exited. The programmer may put a delete in the block so that the object gets deleted early. If the programmer is giving a reference to some other subroutine, there will be some way of preventing the object from being deleted, how this will work I'm not sure.
Note: the way I have designed the way GC's are used there will have to be some way of using an object with more than one GC at a time, again I am unsure of how this will be accomplished, but I am confident that it can be done.