Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a "dual-life" module?

Tags:

module

perl

What is a "dual-life" module? It's mentioned in the perldelta for Perl 5.14.

like image 939
sid_com Avatar asked May 15 '11 15:05

sid_com


2 Answers

Dual life modules are modules that exist in two disconnected source repositories, commonly meaning both in the Perl core (those libraries distributed with perl), and on CPAN.

The CPAN version may be updated more frequently than the core version. The core version may have been tested on more platforms.

In the context of the link you gave, "adding as a dual-life module" means forking the CPAN distribution, possibly making some changes (such as normalizing documentation or licensing), and incorporating that fork into the core perl repository. This means that this module will now be installed by default when anyone installs this version of perl.

like image 95
Eric Strom Avatar answered Sep 19 '22 12:09

Eric Strom


A dual-lived module is one that is found both in the perl distribution and in its own distribution (on CPAN). For example, Data::Dumper is part of the perl distribution and the Data-Dumper distribution. On the other hand, IPC::Open3 is only available as part of the perl distribution, so it's not dual-lived.

The advantage of a dual-lived module (these and these) is that it can be upgraded without upgrading Perl.

If you wanted to upgrade a core module that isn't dual-lived (these), then you have to upgrade all of Perl.

like image 28
ikegami Avatar answered Sep 21 '22 12:09

ikegami