in reply to Parse/Validate Code
So if I understand you right you want to parse a module's file to work out what the module's API is and then parse any program which which use that module and flag places where the program uses the module in a way that's different to the API. Is that right?
If so, then you've given yourself a very hard (maybe even impossible) task. It's tricky enough to even _know_ what the API to a module is by looking at the file, let alone trying to write a program for it. Problems that immediately spring to mind include:
Even having identified the names of all of the object methods how are you going to identify the allowed sets of parameters? Remember that prototypes don't work for object methods. And what about methods that interpret @_ as a hash to simulate named parameters? Or parameters that are a reference to a hash or another object?
All in all I think this is probably impossible and you'd be better off finding a way to minimise your API changes.
--
|
|---|