Search code examples
perlcpan

Why are some core Perl modules also available on CPAN?


For example I believe that the Encode module is considered a core module and shipped with every copy of Perl. It has its own page on Perldoc:

https://perldoc.perl.org/Encode.html

...but it is also available on CPAN:

http://search.cpan.org/~dankogai/Encode-2.92/Encode.pm

From skimming the two documents, it seems that they contain the same text. So why put it in both places? Is it just so that CPAN can be used to lookup documentation on "any Perl module"?


Solution

  • Such modules are said to be "dual-life" modules.

    • So users can upgrade the module without upgrading perl itself.

    • So developers can release fixes and updates to the module on a different schedule (e.g. more often) than perl itself.

    • Or maybe the module started on CPAN, and it was later added to the perl distro (e.g. because a module in the tool chain requires it).

    • Or maybe the module is in the process of being removed from the Perl distro.