Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

If you look at my writeup history, you'll see that many of the questions I pose are about getting complex web apps working, without the help of CPAN. I love CPAN myself, but a lot of regular users don't know how to use it, nor a CLI, etc. My webapps started with manual configuration (think webapps written in php) in mind and I'm slowly working up to having something that can be distributed on CPAN, without alienating my users who are used to the way it's been for yarns of years. I am looking forward very very extremely much to using something like Module::Install to get the dependencies I need for the webapp, but I still need a fallback plan for other users (right now, it's probably the majority of the users)

One of my main issues is trying to package up the needed CPAN modules my webapps require into a perllib that can just be included with the webapp.

The other issues I have is figuring out what to do with a CPAN Module that has a dependency chain that includes an XS module. This is a type of module that I can't easily include, since it has to be compiled, etc.

One of the things I'm noticing is that some newer XS perl modules are shipped without a Pure Perl Implementation to fallback on, but there's another Pure Perl Module implementation by someone else, that attempts to closely mimic the behavior of the first one.

For example, an older module that has a fallback behavior would be something like MIME::Base64 (or, geez, used to)

This new trend, I'm noticing in things like Text::CSV_XS and Text::CSV_PP, as well as Crypt::Rijndael and Crypt::Rijndael_PP. Now I see there's also a MIME::Base64::Perl

At the moment, I basically keep good track of what CPAN modules I use and keep them in a app-specific perllib and also say in the dev notes that this is so, and it'd be a good idea to install these modules yourself (a Bundle is used, at the moment)

I say things like this:

WebAppx uses CSV files, which, by default is handled by Text::CSV_PP - but you'd be better off using Text::CSV_XS, but! Please install this yourself and WebAppX will know what to do. Hazzah! I'm wondering what the best way to have this in code. Right now, I do something like this:

my $csv; eval {require Text::CSV_XS}; if(!$@){ $csv = Text::CSV_XS->new; }else{ require Text::CSV_PP; $csv = Text::CSV_pp->new; }

It seems somewhat scrappy and wasteful.

I know of the Best module, but the low version number and long-time-since-hacked-upon date makes me wonder how good it'd work as well.

I'm also starting to work with CPAN authors in helping to get their modules who have dependency chains that include XS modules to have a Pure Perl implementation (hey, if it's already there, why not?)

Is there a better method that you guys use? 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'.

-justin simoni
skazat me


In reply to Pure Perl Modules, XS Modules, what's the current trends? by skazat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found