How are Perl's core libraries managed?

﹥>﹥吖頭↗ 提交于 2019-12-03 10:17:18
  1. Currently, only libraries that are necessary to bootstrap/install other libraries go into the core list.
  2. Some are only in the Perl git repository. Some are dual-life on CPAN and in the repo. Sometimes bugs get fixed in the repo and the changes are backported to the CPAN version. Sometimes there's a new release on CPAN and a Perl maintainer checks in the module into the repo.
  3. You can rely on a core module. There's an very lengthy deprecation timespan before one gets removed, recent prominent example was Switch.
  4. Packagers (e.g. the people who build RPMs for a Linux distribution) never could get this right; the wrong order of include paths (@INC) not their fault, and finally fixed with 5.12. This is the reason where the recommendation comes from to compile your own perl and not mess with the system installation. With 5.12, you are supposed to just use CPAN to install an upgraded version of a core module, and it gets installed addtionally to the one shipped with the system, but since the new one comes before the old one in the include path, the new one gets loaded when you use/require it.
  5. Laid out in perlpolicy.
  6. Program the functionality and tests for it, document the thing, then release on CPAN or respectively have a maintainer apply the changeset. This is accompanied with a discussion on p5p.
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!