Getting at meta-data is a useful thing. However, the meta-data is usually associated with distributions rather than individual modules.
I dunno about that. Larry has at least hinted that Perl 6 will have metadata attached to each module. Besides, what if Foo::A is (say) threadsafe but Foo::B isn't? (This isn't as farfetched as it seems--an example would be Foo::FastC vs. Foo::SafePerl.) Or what if you have half a dozen modules in your distro, each of which had a different author, and you wanted the machine to be able to list them all?
Of course, if you did want distro-wide metadata, you could set it up in whatever you consider to be the main file. And I can make special allowances for distro-wide data, if it'll help.
You can get at the info with things like Module::Info and CPANPLUS::Backend, and (IMHO) extending these APIs and making them easier to use is the way to go, rather than adding per-module information.
On this point, I understand what you're saying, but I don't know if I agree with it. Module::Info is (currently) more for information the computer can detect by itself--whether it uses eval STRINGs or gotos, not whether it's threadsafe or who wrote it. In its current role, at least, it's basically used to probe the computer's installed module set. A useful thing to be sure, but a different one than what I'm talking about.
CPANPLUS is almost a neutral party in this--it gets its information from the CPAN, so we should really be talking about what the CPAN uses. It already has things organized by author, and it scans for a $VERSION to get the version number, but most of the other stuff indicated by this module it understands poorly at best. Dependencies have always been a MakeMaker-level affair (with CPAN(PLUS)? detecting and responding to such errors) and AFAIK threadsafety and thread use have never been indicated in a computer-readable form. Module::Build indicates licensing terms, but it so far hasn't been widely adopted.
Part of the effort to make this module workable would be to get all these other modules talking to it. I can imagine Module::Info interfacing with Module::Metadata and presenting the metadata as part of its own interface--it just makes too much sense--but I can't imagine Module::Info doing this by itself.
=cut
--Brent Dax
There is no sig.
| [reply] [d/l] |
Fair points :-)
My brain seems to have been disengaged when I read your original post - you're talking about setting metadata, and I was thinking about getting it.
Getting the relationship between the per-module and per-distribution meta-data could be interesting (e.g. modules that are in more than one distribution, modules that have difference licences depending on the distribution, etc.)...
| [reply] |