Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Pure Perl Modules, XS Modules, what's the current trends?

by almut (Canon)
on Dec 20, 2007 at 20:48 UTC ( [id://658246]=note: print w/replies, xml ) Need Help??


in reply to Pure Perl Modules, XS Modules, what's the current trends?

I hope people can understand the importance of having a fall back, pure perl implementation of some of these modules. I do understand that in many instances, these modules are much much slower, but it is better than nothin'.

The problem is you can't easily have a pure Perl implementation in every case. In particular, a module which implements a binding to some C library, would have to re-implement the entire functionality of that library in Perl... (think of Net::SSH::Perl as a (more or less failed) attempt along these lines).  Similarly, if you need to make system calls into the OS.

Replies are listed 'Best First'.
Re^2: Pure Perl Modules, XS Modules, what's the current trends?
by chromatic (Archbishop) on Dec 20, 2007 at 22:34 UTC
    In particular, a module which implements a binding to some C library, would have to re-implement the entire functionality of that library in Perl...

    ... or if I could get P5NCI stable and completer, it could just use that instead of XS.

      ... but would you want to call it "pure Perl" in that case? I mean, from an installation point of view, you'd still have to make sure the respective prerequisite shared object file(s) will be installed on the target system...

      But irrespective of that, a stable P5NCI would be a very nice thing to have :)

        In theory, with a working and stable P5NCI installed, any module which uses it can be pure Perl, so there's no compiler necessary to install them.

Re^2: Pure Perl Modules, XS Modules, what's the current trends?
by skazat (Chaplain) on Dec 20, 2007 at 21:26 UTC

    That point's well understood, and I don't want the universe to bend to my willing, but the 3 examples I state all have XS and Pure Perl versions and they're all packaged in different modules.

    That's the reality.

    I'm just trying to see what may be the best way to say, "Use this if ya got it (the XS Module) and if not, Use this way (The Pure Perl module) - 'cause they both do the same thing: one's probably faster, one's a little easier to package in a home-brewed system.

    I may just try the Best module, since I can package that myself and forgo the eval() statements.

     

    -justin simoni
    skazat me

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-25 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found