hello monks,

The preamble to this post must be clear: i'm four year late and i do not want to criticize Perl devs who maintain and make perl a better thing with new releases, i want just to know what happened and why.

The fact: i was lurking on the web with some vague perl learning intention when i came across Module::Pluggable in the official perl docs and I was intrigued by it.
After a while, since i've closed the browser tab, I've gone for it in the modules (M) list the official docs and i was surprised to not find it there. I've lazyly asked in the chat with no luck.
Put aside my lazyness i searched the possible motivation and i found this post that announced the module to be removed from core prior the 5.20 Perl release.

Then, picking up a little of hubrys, i decided to know why it had to be removed, searching (as suggested by tye) the p5p archive and i found
module deprecations for 5.18 by Ricardo Signes listing all candidates to be removed from 5.18.
The post mention at the beginning that the original discussion was started by Sayer X at Taking CPANPLUS out of core

Now i've read them all and i 've understood something: the goal was to remove CPANPLUS (i assume it is problematic or bugged or not so used..).
A dependency scan of modules used by CPANPLUS was made and for these modules other core modules were searched using them to be sure nothing important would be removed. The list contains Module::Pluggable.

While reading these long threads i read this good sentence by Steffen Muller I want to report (because i was in the 'many' count below..):
I think in all of this, choice of words was a bit poor. "Deprecated" will read to many as "don't use, it's bad", whereas it just means "won't be in core in the future". Please make really, really, really sure this is clear to everyone.

Understood this concept I still do not understand why to remove Module::Pluggable from core.

My idea of the core may be wrong but i think it is convenient (from the users perspective, not the devs) to have many useful modules in it.
It is not a problem installing from CPAN (Yes, even you can use CPAN) but i ever look to core modules as the minimal common factor every perl users can have.
A Perl's program that uses only core modules has anyway a plus in my mind. Also in my limited perl playground i've enough machines to be tired to install too many CPAN modules if i can write down my scripts using core modules. This does not means that i reinvent every wheel i come across, so if i need something to process, let's say, hairy XML i'll install XML::Twig with no problem. But i dont install (as for a recent example) DateTime::Format:: Strptime just to do a one-time time string conversion.

It sounds so ureasonable my opinion? Personally i'd like many others things in core: many *::tiny modules are candicates in my mind. Considering th above example of XML, would not be better to have XML::Twig (or similar good ones) in the core, istead of having all XML new comers been fooled for weeks by the XML::Simple siren?
Probably i would like too many things in the core (Tk..) but why to remove unharmful modules? or is somehow Module::Pluggable risky and i've not found right infos?

Incidentally i learned something useful: declare dependencies also for core modules because nothing is eternal!

About Module::Pluggable i was intrigued by it and i was considering to add the plugin ability to one of my long running spare time projects. Also the module had very good reviews also from one of the author of the mentioned p5p posts (ok was 2007..). the module was also put into the Perl Advent Calendar (ok was in the 2004..). So why it was removed?

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re: About the CORE and the history of Module::Pluggable
by Corion (Patriarch) on Jan 18, 2016 at 12:17 UTC

    IMO, the Perl CORE is too large anyway and with CPANs almost universal ubiquity, it is much easier to update modules outside of the Perl core and still deliver them to a user. p5p cannot (and does not want to) maintain that many modules.

    This is partly a reaction prompted by the times when Perl releases were rare and far in between. A module that only existed in the core back then did not get bug fixes until a new release of Perl. At least nowadays most modules are dual-lifed, that is, they exist within the Perl distribution and on CPAN so they can see far more frequent releases than Perl itself. This is a lesson well-learned, for example the Python core includes some modules that can only be upgraded by upgrading Python itself - the csv parsers are an ugly example of this.

    I think that Module::Pluggable (among others) only got into the core because CPANPLUS relied on it, and with CPANPLUS gone the justification for having that module in the core is also gone.

    Of course it would be much nicer to have a "batteries included" version of Perl, and Strawberry Perl for Windows is quite close in that regard - it also includes XML::LibXML, which is not XML::Twig, but it's close.

      Thanks Corion for your opinion,

      I understand that p5p peoples wont maintain a big mole of modules. But is not the majority "dual life" modules? p5p maintain directly all modules in core? Would not be possible make a release of Perl with up to date modules from CPAN?
      When you'll need a more recent version of a particular module you'll upgrade from CPAN.

      A larger core would not be better for all Perl users?

      Thanks
      L*
      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
        as strawberryperl, citrusperl, dwimperl, activeperl, ... show, making your own distribution is easy
Re: About the CORE and the history of Module::Pluggable
by hippo (Archbishop) on Jan 18, 2016 at 12:24 UTC
    Incidentally i learned something useful: declare dependencies also for core modules because nothing is eternal!

    There are a couple of other good reasons to declare dependencies on core modules. Many vendor perls (yes, I'm looking at you, RHEL) do not install all of core by default. If they decide to package your module and it depends on one of the as-yet-uninstalled but core packages, the dependency may be unmet. Help the packager by declaring the dependencies and it should all work more smoothly.

    It will also help the p5p if you declare core dependencies so that they can more easily see which of the core modules are widely used when deciding what to remove from core in later versions. It is much easier if this is in the metadata.