In the meantime I found out when this META_MERGE tag works and when not: When I run a tool from the terminal which calls "make dist", everything works fine. When I run the same tool from within a cron-job, with stdout and stderr redirected (to a file and /dev/null, respectively), the extra tags in META.yml disappear!
Looks like a bug to me... Best regards, Steffen (P.S.: Why do I run the tool from within a cron-job, you may wonder? Because when doing a "make dist", I "touch" all files and directories first. It turns out that the size of the dist file varies quite a bit depending on this time stamp on all files and dirs! So I re-run the "make dist" every minute and keep the new dist file if it is smaller. That costs me (or better, Ralf :-) ) a bit of CPU time, but when several thousand people download the file, this saves some bandwidth!) 2009/10/16 O. STeffen BEYer <[email protected]> > 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 >> > >
