In the meantime, I found this:
http://use.perl.org/articles/08/09/06/1541246.shtml
And with trial and error, I found out this (META_MERGE is the keyword I was
looking for and couldn't find in any of MakeMakers documentation files):
WriteMakefile(
'META_MERGE' => {
'recommends' =>
{
'Carp::Clan' => 6.01,
'Date::Calc::XS' => 6.2
}
},
'NAME' => 'Date::Calc',
'VERSION_FROM' => 'lib/Date/Calc.pm',
'ABSTRACT_FROM' => 'lib/Date/Calc.pod',
'PREREQ_PM' => {
'Carp::Clan' => 5.3,
'Bit::Vector' => 7.1
},
'AUTHOR' => 'Steffen Beyer <[email protected]>',
'dist' => { COMPRESS => "gzip -9", SUFFIX => "gz" }
);
However, for unknown reasons, this worked once, but later the "recommends"
section in META.yml disappeared again. Oops?!?!
And I still wonder how I can tell MakeMaker to produce more complex
structures such as this:
optional_features:
- opt_csv:
description: Provides parsing of CSV streams
requires:
Text::CSV_XS: 0.43
recommends:
Text::CSV: 1.12
Text::CSV_PP: 1.20
Text::CSV_XS: 0.65
- opt_excel:
description: Provides parsing of Microsoft Excel files
requires:
Spreadsheet::ParseExcel: 0.26
Spreadsheet::ParseExcel::FmtDefault: 0
recommends:
Spreadsheet::ParseExcel: 0.49
Which is supposed to allow the user to make a better informed decision
whether or not to install certain recommended additional features/modules.
Any hints on all that?
Many thanks in advance!!!
Cheers,
Steffen
2009/10/16 O. STeffen BEYer <[email protected]>
> How can I tell MakeMaker to insert "recommended" modules into META.yml?
>
> When I edit META.yml manually, the next time I run "make dist", MakeMaker
> generates META.yml anew and discards my entries.
>
> What is the right option for "WriteMakefile()" to tell it that there are
> modules which are not required but recommended?
>
> Thank you!!!
>
> Best regards,
> Steffen
>