# from David Golden
# on Wednesday 28 January 2009 14:55:
>> I think this sort of thing will have good uses in the declarative
>> form (METAbefore.yml?), but I'm not sure about trying to fit it
>> directly into META.yml.
>
>It wouldn't go into META.yml -- it would be in Build.PL.
> requires => {
> ( $^O eq 'MSWin32' ? ( 'Win32API::File' => 0.11 ) : () ),
> }
>
>To this:
> maybe_requires => {
> 'Win32API::File' => [ 0.11, $^O eq 'MSWin32' ]
> }
I think I would rather express that 'eq' check as data.
>Then when Build.PL is run, if the condition is satisfied,
> Win32API::File would get included among requirements, but when
> META.yml is generated, it's included in the 'maybe_requires' section,
> not the 'requires' section.
Here's where I'm not following what you want to do to the existing
META.yml. Are you saying the consumer is going to directly use
$condition to decide if it needs the module? If so, we need to have
$condition as data, which means we've arrived at a fully declarative
META.yml -- at which point I don't need Build.PL, but might like it to
be generated automatically for compatibility. But, META.yml still
needs to be generated to add your e-mail address, version number, and
synopsis, so I think the author's setup file might be named something
else -- and I suppose that all just depends on what tool you use to
create it.
--Eric
--
"...our schools have been scientifically designed to
prevent overeducation from happening."
--William Troy Harris
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------