How to make “prereqs” of CPAN::Meta::Spec require a distribution instead of a package?

前端 未结 2 1125
野趣味
野趣味 2021-01-24 17:17

I\'m researching about how to package some of my Perl apps and better manage their dependencies to make distribution easier for me and my customers, which most likely doesn\'t i

2条回答
  •  难免孤独
    2021-01-24 17:53

    That's really not what you want to do. You want to pre-req what you actually require. So, for example, if you need File::Spec, that's what you need, regardless of whether it comes from perl core or from a separate CPAN distribution.

    I've seen cases where certain modules have moved from CPAN to core, or vice versa. By requiring the module directly, you don't need to ship new releases of your dependent distributions simply because someone you depend on changed their method of distribution.

    I've also seen cases where certain modules are split off from their original distributions when it was determined they were valuable as standalone modules. Depending on the module means that you no longer drag in a bunch of other modules for a simple dependency.

    What you're more or less looking for is akin to the Task::* modules. No real logic in most of them, just a list of further dependencies.

提交回复
热议问题