Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

What modules should be added to the corelist?

by Anonymous Monk
on Aug 16, 2019 at 13:17 UTC ( [id://11104568]=perlmeditation: print w/replies, xml ) Need Help??

If I could get one module into core it would be the magnificent IO::All! How much is it gonna cost me? Seriously.

I think these would make a lovely gift to developers:

Devel::NYTProf
Devel::REPL
Regexp::Debugger
Pod::Webserver

How about "a friendlier interface to File::Find":

File::Find::Rule

Multiply the speed of Perl by the CPU cores:

MCE (and make it as automatic as possible)

Eat other languages:

FFI::Platypus
Inline

How would you bloat the core?

  • Comment on What modules should be added to the corelist?

Replies are listed 'Best First'.
Re: What modules should be added to the corelist?
by hippo (Bishop) on Aug 16, 2019 at 13:46 UTC
      I would rather see Syntax::Keyword::Try in core. The corollary to that is that it would make sense as a feature flag, and as a core feature it could reach into internals that a CPAN module cannot (unless you're Coro).
Re: What modules should be added to the corelist?
by davido (Cardinal) on Aug 17, 2019 at 03:45 UTC

    In a world where we often work by targeting containers, and also often use tools like Carton, I don't see a big advantage to growing the core distribution. In fact I see doing so as being disadvantageous to the container paradigm. A nice slim distribution, with simple means of either bundling or pulling down what is needed makes more sense, I think.

    To some degree I think that the existence in the core of modules that aren't needed for building and installing Perl and installing modules is mostly a result of inertia and a desire to maintain backward compatibility. I don't know if Hash::Util is used by the Perl install process, or to facilitate installing other modules. If not, maybe it's a candidate for exclusion from the core, except that we're kind of locked in to avoiding breaking changes. CGI was dropped from the core not only because it wasn't needed there, but because keeping it seemed like an endorsement of an antiquated programming model.


    Dave

      CGI was dropped from the core not only because it wasn't needed there, but because keeping it seemed like an endorsement of an antiquated programming model.

      The CGI module is a GUI toolkit for web apps. It was added to the core because the web is important. Dropping it, as the web's relevance grows, makes sense to me. No not really. I would keep that for full backcompat, and add something like Mojolicious::Lite for modern web apps. :-)

Re: What modules should be added to the corelist?
by jcb (Parson) on Aug 17, 2019 at 06:27 UTC

    PDL would be nice, but very much impractical to add to the core.

    I think that, while existing modules should not be removed, the criteria for adding new modules to the core distribution should be fairly strict. Particularly, I would suggest limiting inclusion of new modules to either:

    1. Pure Perl modules that are both small and very widely used. If the majority of installations will be pulling a small module from CPAN, it might belong in core.

    2. Modules (usually XS, but some pragmata are pure Perl) that are intricately tied to the core and are effectively "optional builtins". If the module relies to a great extent on other support within the core, it should probably be shipped with the core. I believe that Scalar::Util::weaken and the restricted hash interface in Hash::Util are examples of features in this category. Another monk mentioned Hash::Util::FieldHash, which, as I understand, requires cooperation from the core garbage collector to do its work. It is therefore closely tied to the core and should probably be maintained with the core.

    Or do I misunderstand the issue?

      Modules (usually XS, but some pragmata are pure Perl) that are intricately tied to the core and are effectively "optional builtins".

      You mean the modules called "core extensions" in Config::Extensions?

      perl -MConfig::Extensions=%Extensions -e 'for (sort{lc$a cmp lc$b}keys + %Extensions){print"$_\t$Extensions{$_}\n"}'
      Why are some core modules referred to as "extensions"?
Re: What modules should be added to the corelist?
by johngg (Canon) on Aug 16, 2019 at 14:00 UTC

    I often reach for Term::ReadKey and wish it was in core as it would hardly add any bloat at all.

    Cheers,

    JohnGG

Re: What modules should be added to the corelist?
by VinsWorldcom (Prior) on Aug 16, 2019 at 17:35 UTC

    Sounds like a good Poll question!

Re: What modules should be added to the corelist?
by Anonymous Monk on Aug 16, 2019 at 14:25 UTC
    That's the problem with the core list. It implicitly becomes a "recommended" list and recommendations change. But I also think we've gone too far in the opposite direction. Path::Tiny is better than IO::All, and Path::Iterator::Rule is better than File::Find. I think your debugging choices and FFI::Platypus would certainly be good candidates though.

      Actually no. corelist is a frontend for Module::CoreList, which only describes "what modules shipped with versions of perl".

      Since some time, the Perl developers have decided to only include in the Perl core distribution whatever is necessary to build and install Perl and to install modules from CPAN.

      You are still free to create richer Perl distributions, as for example the good folks at http://strawberryperl.com/ and https://activestate.com have done. Alternatively, you can also simply create a Task:: module that lists your favourite modules.

      To expect that the Perl developers care for and maintain a module that you consider good is expecting a bit too much. CPAN is available and as you already understand, recommendations change. Hence this is why the Perl core aims to only include what is needed for/by Perl itself.

      For what SawyerX aims, maybe see his keynote at Perlcon in Riga - he wants to include a Moo* class constructor/accessor builder in the core. Maybe you can lobby for your other trends du jour there.

        Since some time, the Perl developers have decided to only include in the Perl core distribution whatever is necessary to build and install Perl and to install modules from CPAN.

        That's right, but goodies got added which aren't strictly necessary for those purposes, e.g. Hash::Util::FieldHash. I'm glad it is there (though I liked more the name choices of Alter from which it derives).

        perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
        To expect that the Perl developers care for and maintain a module that you consider good is expecting a bit too much. CPAN is available and as you already understand, recommendations change. Hence this is why the Perl core aims to only include what is needed for/by Perl itself.

        While agreeing with the lean core principle, I've seen Perl get severely eclipsed TWICE by completely inferior languages that sell themselves as a "kitchen sink" and as having "batteries included". This is about what people want and what Perl needs, not my favorite modules.

        Clearly Perl is incomplete without modules or the corelist would not have over 600 items. The only question is what to include. My suggestions fall into 3 broad categories:

        1. Complete Perl by bundling missing features (like a REPL)*
        2. Update old interfaces and make things easier (like IO and Rule)
        3. Encourage Perl use by using other languages in Perl! (FFI, Inline)

        I would settle for Path::Tiny but this example from IO::All says it all:

        replace this: open STUFF, '<', './mystuff' or die "Can't open './mystuff' for input:\n$!"; local $/; my $stuff = <STUFF>; close STUFF; with this: my $stuff < io './mystuff';
        * Frankly I would go wild with things like PPI, Perl::Tidy, Perl::Critic, Perl::Examples, something like Classic::Perl (expanded, for complete backcompat), B::Keywords, B::C, B::CC, Modern::Perl, etc.
Re: What modules should be added to the corelist?
by Anonymous Monk on Aug 17, 2019 at 01:37 UTC
    *yawn×* anyone with any interest already does their own fat distribution

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://11104568]
Approved by footpad
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2024-04-23 21:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found