Slashdot Mirror


Helping Perl Packagers Package Perl

jamie writes "chromatic has a great post today on the conflict between OS distributions and CPAN's installations of perl modules, along with some suggestions for how to start resolving this maddening problem: '[Though Debian has] made plenty of CPAN distributions available as .debs, I have to configure my CPAN client myself, and it does not work with the system package manager. There's no reason it couldn't. Imagine that the system Perl 5 included in the default package... had a CPAN client configured appropriately. It has selected an appropriate mirror (or uses the redirector). It knows about installation paths. It understands how to use LWP...' The idea of providing guidelines to distros for how to safely package modules is a great one. Could modules request (a modified?) test suite be run after distro-installation? Could Module::Build help module authors and distro maintainers establish the rules somehow?"

16 of 130 comments (clear)

  1. Better fix it somehow by Brian+Gordon · · Score: 4, Insightful

    A broken mess of modules distributed inconsistently is the quickest way to kill my interest in a platform...

    1. Re:Better fix it somehow by Anonymous Coward · · Score: 4, Insightful

      hasn't stopped people using windows

    2. Re:Better fix it somehow by SheeEttin · · Score: 3, Insightful

      Yep. A little while back, I was looking for an svn-bisect. Ubuntu has a perl svn-bisect in the repos, so I tried it. As far as I could tell, it didn't do anything, so I tried to get a newer version from CPAN. Now, how do I use this... It requires other modules? Okay, I'll grab them too. Now, how do I use THESE... compile them? Okay.
      These require modules too? Uh, grab this one, and...
      Screw it. I can live without.

  2. And what other languages too? by FooAtWFU · · Score: 2, Insightful

    Ruby gems? PHP Pears? Python pies?

    --
    The World Wide Web is dying. Soon, we shall have only the Internet.
    1. Re:And what other languages too? by buchner.johannes · · Score: 2, Insightful

      You are thinking too small. Any package that has submodules/extensions has the same problem. Such software typically created and uses their own extension system.
      Some examples: Firefox extensions, Apache+PHP applications (wordpress), emacs, claws mail extension ... Virtually any package that can act as a platform. Just take a look in your package manager.

      The current idea is to push everything into the repo too. Good because it is reviewed and checked twice; bad as it is incomplete and inconsistent (half is over the package manager, half over another tool [e.g. cpan]).

      One solution would be to make the package manager pluggable, so it can install subpackages sanely, and can access the repo of the other party.

      --
      NB: The message above might reflect my opinion right now, but not necessarily tomorrow or next year.
  3. And Santa will bring me peace in the Middle East!! by Anonymous Coward · · Score: 5, Insightful

    Could a /. reader get laid? Could I go to bed before 4 AM? Could someone get me a real job?

    No.

    More seriously, not as CPAN works now. There is no "snapshotting" or "consistent distribution level" mechanism, so there is no mechanism to write consistent component compatibility lists, and no way for the existing CPAN to look back *out* into the operating systems available components. Even component naming is too inconsistent among distributions. And when different packagers fold specific packages into their basic Perl package, or components that are required for new modules move into the basic Perl package itself, you have dependency madness just waiting to bite you, very, very hard indeed if you let your local Perl integrator replace all the dependencies. This way lies Gentoo madness, and it's hideously unstable in the real world.

    There are steps you can use, but they're dependent on Perl authors actually following packaging "best practices". Building RPM's from many perl components is fairly easy, especially with components like 'cpan2rpm' available, but then you have the crack-monkeys who prodoce component 1.00, 1.20, 1.201, 1.202, 1.2437, and then 1.30 and expect 1.30 to be considered "the most recent", and no way to flush the funky numbered ones from CPAN lest development continue and you get to 1.201 the hard way. And then there are idiots who can't be bothered to write actual Makefiles or Make::MakeMaker configurations, but each invent their own replacement for "make". And now that Perl 5.10 is out, too many "latest release" components form CPAN are going to simply demand updates to that new Perl release. What a wonderful crapshoot to upgrade your Perl, *on the fly* to a new major release simply because you want to print dates a certain way?

    Then there's the continuing use of Apache 1.3 and the matching mod_perl by Debian setups, and the utter nuttiness of rolling *BACK* Perl components to be compatible with that. What a wonderful way to *completely* fuck up your existing deployed codebase as rolling back your Perl to perl-5.6 to revert the incompatible components for that one.

    Oh, and don't forget the "site-lib" versus "vendor-lib" settings. God forbids most Perl authors be bothered to actually *CARE* about it, but it does make a different in whether a component will be loaded and actually used in place of a separately installed one deployed as part of the operating system's other dependencies or package management system.

  4. mostly a problem with ancient ancient modules by Anonymous Coward · · Score: 2, Insightful

    if you have a list of offending modules, then by all means don't keep it a secret

  5. Not just Perl by Dorsai65 · · Score: 2, Insightful

    This isn't just a Perl problem; there are several packages that I know of that different distros have problems with.

    I think it's more the nature of F/OSS: anybody that can repackage things, will -- just like anyone that wants to, can cobble together their own distro.

    I don't see the problem going away for Perl, or any other package -- or even for the various distributions. As long as there are True Believers in .deb vs .rpm vs. git, /usr vs /opt, Gnome vs KDE, and so on, I see it continuing to be a problem. Nobody wants to give up a little bit of their "freedom" to do-as-they-damn-well-please in order to establish some consistency and minimum standards so as to make life easier for mere users. I've previously suggested that the fragmentation of Linux (of which this particular situation is just an example) is what's REALLY keeping Linux off more desktops.

    But, hey, what do I know? I'm just one of those folks that only wants to get actual productive work done, and remembers what it was like for me when I made the switch from Windows(tm) to Linux.

    --
    --- Asking inconvenient questions for over 30 years...
  6. Re:At least the Perl crowd is trying, by mwa · · Score: 5, Insightful

    easy_install works just like CPAN. Download and install stuff so the standard distribution software management tools are now worthless for:

      1. Knowing what is installed on which production machines (basic software inventory)
      2. Reporting packages with dependencies on a package with a newly reported security issue
      3. Automatically upgrading to new releases
      4. Easily rebuilding and deploying to multiple hosts on different architectures and different releases of distros (possibly different distros)
      5. Managing dependency conflicts between different packages

    and more that escape me right now because I haven't finished my coffee yet.

    CPAN, easy_install and their ilk are wonderful for the developer that needs a bunch of stuff to get their application working. They are evil incarnate for the administrator that needs that application to work reliably and consistently on more that a couple of machines.

    There is a huge difference between "easily installing stuff" and managing systems. The second you add anything that "works around" the standard way of doing things, whatever standard you've adopted, you've abandoned all hope of having standard operating procedures and consistent production management.

    This is why systems administrators get so edgy... Every developer, user, language community, or whatever, thinks their little exception makes life easier. Exceptions don't scale.

    Ok, they do scale. They evolve into chaos.

  7. Re:How much by Anonymous Coward · · Score: 1, Insightful

    Not really

  8. Yeah, no kidding by Giant+Electronic+Bra · · Score: 3, Insightful

    Sorry guys, but I do a LOT of really large perl based projects. CPAN is fine. Hell, it works better than the supposedly wonderful rpm and apt based package managers. At least when you install from CPAN you know the stuff WORKS because it actually gets tested. The CPAN dependency system works fine too. All I can conclude is that people who have had problems with it have a whole lot of RPM installed packages that were guess what? BADLY PACKAGED by the distro.

    I agree, it would be great if CPAN and package managers coordinated. There are things CPAN certainly lacks, like transactions and any real ability to uninstall. What it does do, it does well.

    --
    "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
  9. Re:At least the Perl crowd is trying, by Dog-Cow · · Score: 2, Insightful

    This is why I packaged any non-standard modules with my application when I developed with Perl on my last job. By containing the modules within the app, I made it my problem to keep them up-to-date, and not the system administrator's.

  10. Re:Not to troll by thanasakis · · Score: 3, Insightful

    I feel that you have already answered the question yourself.

    Some of us would switch if Python/Ruby/Whatever was ten times better than Perl. But it's not. In fact, if you are fairly experienced with Perl, you can do almost anything almost equally as good with Perl as you would do it with the others. Why go through all the trouble of switching when you have a tool that you know too well and you are completely comfortable with?

    And what about all these guys that are bashing Perl every time it gets mentioned in /.? Judging from the fact that they are frequently:

    • citing problems solved years ago
    • mentioning Python/Ruby features that Perl has too
    • hell, even saying PERL and not Perl

    one can easily understand that the Perl they are referring to is different than the Perl many people are using. In the real world, you can write perfectly readable Perl code that works very well and fast.

    If one should start learning now, he/she probably could choose Perl or Python or Ruby and be equally as happy. Maybe even just a little bit happier with the last two, especially if you are care about code aeshetics. But if you already know how to use Perl to accomplish your task, IMHO trying to switch may involve a certain amount of wasted time.

    Apologies to Python/Ruby guys, but I have yet to encounter a very compelling reason to switch from Perl for the tasks I've been using it. Maybe it's just me.

  11. Re:Homebrew by perlchild · · Score: 2, Insightful

    Sure sounds like a good thing we never got Ruby/Perl/Python on parrot. They can't agree on anything, now imagine making it a requirement that they work coherently inside the OS' distribution systems and let modules/programs written in one call the others, and expect it to work, flawlessly.

  12. Re:At least the Perl crowd is trying, by DragonWriter · · Score: 2, Insightful

    The second you add anything that "works around" the standard way of doing things, whatever standard you've adopted, you've abandoned all hope of having standard operating procedures and consistent production management.

    CPAN, Rubygems, and Python easy_install don't "work around" the standard way of doing things, they are tools that work across a wide variety of platforms, which don't share a standard way of doing things (and some of which don't have much of a standard to start with.)

    It would certainly be good to have, for a each, seamless integration with the standard package manager or equivalent for each platform on which they work, but that's no small task for any of them.

  13. Re:Not to troll by chromatic · · Score: 2, Insightful

    All I know is when I review some old Perl code I've written back around 1999 or 2000 and then place it alongside of similar work in Ruby I get cross-eyed over the asthetic ugliness of the Perl code.

    Perhaps those of us who write new Perl 5 code in 2009 are better at writing maintainable code than you were in 1999 or 2000. Certainly I'm much better at it than I was in 1999, especially considering the tools and community standards that have emerged since then.