If the goal is only to pick up versioned dependencies, I'm surprised we even need to bother with that.
For M:I I've been thinking of just scanning all of script and lib for /^use Module::Name 1.23/ to determine requires, and all of t to find build_requires/test_requires. Anything loaded without a specific numeric version would be ignored and would have to be specified with a manual requires statement. I'd filter out POD and comment lines, but I wouldn't bother with full source parsing (can't really do that inside M:I anyway since I'd have to bundle PPI). Adam On Sun, Feb 5, 2012 at 12:23 PM, David Golden <xda...@gmail.com> wrote: > On Sat, Feb 4, 2012 at 5:17 PM, Adam Kennedy <a...@ali.as> wrote: >> That's how Module::Install's requires_from does it too. >> >> I should look at zilla's code and see how it runs, might be worth >> aligning M:I and it's detection. > > It uses Ricardo's Perl::PrereqScanner, which does a pretty sane job of > it (even detects base/parent and so on). It has some extensions for > picking up Moose and POE prereqs and so on. > > It doesn't help with optional, dynamic prereqs so those have to be > specified manually, but that's unavoidable I think. > > David