in reply to Same function multiples unknown modules

You could walk the symbol table, but it'd be less dicey (i.e. you can't guarantee 100% that J Random Module's runonce really is your runonce) to have the modules call a registration routine if they want something run whenever (something along the lines of use MyRegistry qw( register ); register( 'Sompackage::runonce' );). You then walk the list that builds calling the subs named (or passed as coderefs).