Re: What modules should be added to the corelist?
by hippo (Bishop) on Aug 16, 2019 at 13:46 UTC
|
| [reply] |
|
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).
| [reply] |
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.
| [reply] |
|
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. :-)
| [reply] |
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:
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.
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?
| [reply] [d/l] [select] |
|
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"? | [reply] [d/l] |
Re: What modules should be added to the corelist?
by johngg (Canon) on Aug 16, 2019 at 14:00 UTC
|
| [reply] |
Re: What modules should be added to the corelist?
by VinsWorldcom (Prior) on Aug 16, 2019 at 17:35 UTC
|
| [reply] |
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. | [reply] |
|
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.
| [reply] |
|
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'
| [reply] |
|
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. | [reply] [d/l] |
|
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 | [reply] |