开发者

Non Perl files that need to be installed with CPAN distribution?

开发者 https://www.devze.com 2023-04-01 08:43 出处:网络
I need to have files installed with my CPAN dist that aren\'t Perl.开发者_如何学Go Where in the dist should I put them? and what\'s the best way to reference them from within a module so that I have a

I need to have files installed with my CPAN dist that aren't Perl.开发者_如何学Go Where in the dist should I put them? and what's the best way to reference them from within a module so that I have access to them regardless of users configuration?


Well, you're not very clear on what these files are and how they're used, but you're probably looking for File::ShareDir.

File::ShareDir only takes care of the run-time access to the files from your module. The way you get the files installed along with your module depends on which install system you use:

  • If you use Dist::Zilla, you use its ShareDir plugin, which has an undocumented dir parameter that defaults to share.

  • For Module::Build, you use the share_dir parameter.

  • For Module::Install, you use the install_share command.

  • ExtUtils::MakeMaker doesn't have built in support, but you can use the File::ShareDir::Install module to add it.

0

精彩评论

暂无评论...
验证码 换一张
取 消