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

Comment on

( #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

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (8)
    As of 2018-03-18 21:38 GMT
    Find Nodes?
      Voting Booth?
      When I think of a mole I think of:

      Results (230 votes). Check out past polls.