Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Why Perl does not support database access through core modules?

by Abigail-II (Bishop)
on Jan 21, 2004 at 13:50 UTC ( [id://322881]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Why Perl does not support database access through core modules?
in thread Why Perl does not support database access through core modules?

Well, I don't support removing anything out of the core, for reasons of backwards compatibility. But, yes, for most of modules you list, I agree they should never have been in the core.

As for your list, not all the modules you mention are part of the core. LWP for instance is not part of the core - but that's one module I think should belong in the core, if only for the fact it's CPAN.pm's preference. For the same reason, I don't object against the presence of Net::* (which, BTW, is only a recent addition to the core). CGI::* and HTML::* don't belong in the core IMO. Neither do URI::* or HTTP::*, unless LWP would depend on them (if LWP would be in the core).

The Class::* modules shouldn't be in the core. They don't fit any criteria I mentioned above. OTOH, modules like File::Spec and File::Basename, and probably more of the File::* modules are used when installing perl and modules. IPC:: can stay as well, as it's tied to core features.

I consider List::Util and Scalar::Util to be borderline cases. They are heavily tied to perl internals, and could be quite version dependent. OTOH, the same argument could be made for several Devel:: modules, and they live happily on CPAN as well.

Math:: has no reason to be in the core (other than historical reasons). It lives independently on CPAN as well. Same with Memoize.

DBMs and DB_Files have a long history. DBM support dates from before perl5, and perl5 still supports 'dbmopen' and friends as core features.

Search::Dict doesn't belong in the core, IMO. Text::* modules only for where they are needed to support the POD tools.

The Win32 module isn't part of the Perl core (it says so in the POD). I wouldn't put the POD in the Perl core either. WWW::RobotsRules isn't in the core either.

but also what they would consider to be "core".
I think this discussion is only relevant if we consider the "core" to be what's distributed in the perl-$VERSION.tar.gz file. That is, the file that's made public by one of the current pumpkings.

Abigail

  • Comment on Re: Why Perl does not support database access through core modules?

Replies are listed 'Best First'.
Re: Re: Why Perl does not support database access through core modules?
by dragonchild (Archbishop) on Jan 21, 2004 at 16:15 UTC
    I got my list of what's in the core from http://www.perldoc.com/perl5.8.0/lib.html, which, to me, implies what's supposed to be in the core for 5.8.x. I checked my copy of 5.8.2 and it includes files not on that list (as well as not having files on that list). Files not on that list that I wouldn't think should be in the core include:
    • Filter::Simple (is it used by other core modules?)
    • Hash::Util (same criteria as Scalar::Util and List::Util)
    • Storable and FileCache
    • Getopt:: (Is it used by some Makefile.PL's?)
    • MIME::
    • Digest::MD5 (unless it's needed by CPAN)
    • Data::Dumper (this is borderline, IMHO)
    • User::

    The dbmopen support in perl5 ... Personally, I think that dbmopen and friends should be treated as locked is with Threads. If you use the module, you get the keyword, otherwise it's not reserved. I think that would be an acceptable compromise, but, then again, I've never used (or seen used) dbmopen and friends in my experience.

    I would suggest an additional cleanup activity - removal of all reserved words that require an additional module to work. locked() isn't a reserved word in the core ...

    ------
    We are the carpenters and bricklayers of the Information Age.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      To me, perldoc.com looks like an outdated website from an individual (Carlos Ramirez) who is totally unknown to me. I wouldn't take his list as something that is supposed to be in perl 5.8.x. Having said that, I agree that most of the modules you list shouldn't have been in the core distribution. (Digest::MD5 is used by CPAN; Data::Dumper is probably tied into the internals tightly enough that it wouldn't survive outside the core distro).

      The dbmopen support in perl5 ... Personally, I think that dbmopen and friends should be treated as locked is with Threads. If you use the module, you get the keyword, otherwise it's not reserved. I think that would be an acceptable compromise, but, then again, I've never used (or seen used) dbmopen and friends in my experience.
      That's out of the question. Backwards compatibility is important. dbmopen/dbmclose have been available since at least perl-4.0.0 (which dates from 1991), probably even before that. There's not much gain in removing the keywords.
      locked() isn't a reserved word in the core ...
      Nope; but lock is.

      Abigail

Re: Re: Why Perl does not support database access through core modules?
by ambrus (Abbot) on Jan 21, 2004 at 15:14 UTC

    I think that Scalar::Util should be in core, because of the weak references. It would be strange if the perl binary could handle weakrefs but you would have to download a module to use them. AFAIK, weak refs were experimental with 5.6 versions, but they are not in 5.8, and so 5.8 has Scalar::Util in core, 5.6 does not. Correct me if I'm wrong please.

      I think that weakrefs were only experimental as far as using them from the Perl side of things. I believe it's been available in the interpreter for all of the 5.x series. I've never looked at the source for Scalar::Util, but I would guess it's just a wrapper around newrv_noinc()

      -Lee

      "To be civilized is to deny one's nature."

        I think no. Scalar::Util::weaken creates a weak reference that will be undefed if what it points to is freed. newrv_noinc won't do that I belive.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-19 19:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found