Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
In this case it's not an OO module, but in the past I have had the pain of switching back/forth from different implementation namespaces. I agree this is a good solution in that case. Not disimilar from the scenario davido mentions where the PP version uses the _XS version if it's available (thus giving one namespace for the user to use) with a use 'no_xs' etc. to force the PP version. Like I said, this particular module isn't OO, but I'm going to think about this some more since some OO XS cpan modules appear in my future and I'd like a clean solution.

What would make this even better is if the root module exported tests. Of course there's no easy way to do this with stuff in the .t directory, so the module will have to install something (probably .pm modules) that the two implementation classes could use for the shared tests. This has the distinct negative of permanently polluting the user's machine - does anyone have a better idea for how to share tests across cpan distributions?

I *think* in your discussion here you're assuming both PP and XS versions in the same distribution. I prefer to have them separate for two reasons - one it allows different authors (in many cases the original author has no appetite or ability for XS, and the author of a few XS speedups isn't interested in maintaining the whole distro even if the original author was happy to give it up). The other reason mentioned by davido is in the case of things like shared hosting, admins are going to refuse anything that even smells of XS (even if it has some fancy non-standard install process that can be instructed to skip it).

In reply to Re^2: On naming of XS extension modules by aufflick
in thread On naming of XS extension modules by aufflick

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 nobody stirs...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (3)
    As of 2018-01-19 04:19 GMT
    Find Nodes?
      Voting Booth?
      How did you see in the new year?

      Results (215 votes). Check out past polls.