Better RPM Perl Auto-Requires

Comments welcome and appreciated, on the talk page.

Current Status
has been able to automatically generate Perl requires and provides for some time now. In most cases, it works just fine, but in many cases it fails us, and we end up having to filter them. There have also been significant advances in Perl since the autoprov/req scripts were written, resulting in language constructs that are simply not recognized. (Moose and other metaclass-oriented frameworks are a great example of this). This has resulted in a disproportionately large percentage of Perl packages in Fedora having some sort of wrapper around the autoprov/req scripts.

It's time for new autoprov/req scripts.

Questions

 * 1) Should we try to normalize the versions?

Requirements
Apologies to those of us without widescreen monitors :)

No duplicate requires
We often see duplicate requires. These are harmless, except in the case where one requires is versioned and another unversioned.

This might need to be addressed at a higher level than perl.prov... Maybe some sort of RPM-level Lua script? (see, e.g. RPM_scripting_with_Lua)

use base syntax
Both  and   style constructs need to be recognized and handled. (They're basically the same thing, anyways.)

Mo*se syntax
Both and  have similar subclassing and roles syntax; only Moose has metaclasses and traits (metaclass roles).

extends

 * Multiple classes can be specified
 * not possible to specify version with this syntax

with

 * Multiple classes can be specified
 * not possible to specify version with this syntax

metaclasses
Class, attribute, methods.

traits
Class, attribute, methods.

Catalyst and other plugin syntax
Note that it is quite common for a Catalyst app to have a multi-line "use Catalyst" statement; we need to be able to deal with multi-line  statements.