in reply to Re: Where do Perls come from, Mommy?
in thread Where do Perls come from, Mommy?

Modules that use XS links to C are a good case in point. They are often difficult to install, with or without CPAN, and no amount of testing is going to get rid of all the difficulties, it's just a hairy system. Many other languages have the capability to dlopen() C libraries and make arbitrary calls against them; I wish Perl were able to do that. If it could, many of the uses of XS could be avoided, which would definitely help - PurePerl modules are very rarely difficult to install in my experience.

You mean something like C::DynaLib? Well, there's a big warning on top of the README of that module:

*********************************************************** *** THIS CODE CONTAINS SYSTEM DEPENDENCIES. *** *** IT WILL NOT WORK ON ALL COMPILERS, MACHINES, OR *** *** OPERATING SYSTEMS. USE AT YOUR OWN RISK. *** *********************************************************** *********************************************************** *** A BETTER WAY TO INTERFACE TO C CODE IS WITH XS. *** *** PLEASE READ THE "perlxs" DOCUMENTATION BEFORE *** *** MAKING EXTENSIVE USE OF THIS MODULE. *** ***********************************************************
Please also note that there may be still systems without dynamic loading.

Replies are listed 'Best First'.
Re: Re: Re: Where do Perls come from, Mommy?
by flyingmoose (Priest) on Apr 01, 2004 at 22:21 UTC
    dllopen (calling functions by name from libraries) is really a PITA when you need something other than a function name, such as those horrid cases where some dolt that you work with coded their library in C++ and you need an OO interface :) Been there, tried that, got the T-shirt. But yeah, if you are doing a plugin interface and it's a bunch of C-libs it's kinda cool. So do that dllopen inside your C code and XS into THAT!

    Yep, Fedora Core can be a BEAST with weird dev packages, such is the nature of Fedora -- I'm stuck with it since I have an obscure laptop and it makes trying to get Debian up a little 'fun'. But this is Fedora's problem, not Perl, and yes, unfortunately (as much as I would like it) dev packages change and CPAN modules can't work with every version. But with Fedora doing the gruntwork in testing SELinux and GNOME 2.6, they are going to be stable and great, so maybe they deserve a bit more credit! I appreciate them.

    So far I have trouble with SDL, Zinc, some Audio stuff, what else? Quite a darn bit. But overall, it runs on my evil laptop, I have apt support, and that's all well and good. dllopen won't prevent you from a changing interface, anyway.

    They're a team. Implying that rpm is somehow "dependency hell" just shows how little you know about RedHat/Fedora; dpkg is equally "dependency hell" on that basis.

    apt, my man, use apt -- and with freshrpms sources.