Make each of your modules a class that inherits from a common parent class. The parent class could then hold an array of function references to the different plugin's scan methods. Each plugin would add a reference to its own scan method in this array in its constructor. Your scan program would than just loop over this array and call each function in turn. To summarize:
- Build an abstract base class, having an @scan_methods array (or any name you might fancy)
- Make each of your plugins a class that @ISA('that base class')
- Have your constructor of the plugin register the callback: push SUPER::@scan_methods, \&scan;, where scan is your plugin's scan method
- In your scan program do: &$_ for @{$BaseClass->get_next_scan_method}, or whatever way you want to access the scan_methods array.
CU
Robartes-