Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I think that the correct route is very environment specific, but that in general I would lean heavily toward a Perl-centric interface. There are, as you note, distinct advantages to each route.

If the module is apt to be a performance bottle neck, then you may be right to sacrifice Perlisms on the alter of efficiency. This is the case for modules that are either going to be used mostly in house, and so you don't care about adoption by the community at large of your (perhaps ugly) library, or because it is a common performance bottle neck for lots of applications and so people are willing to surmount the barrier to entry.

In general, though, the human factor is a much bigger consideration than the machine factor. When pulling a module off of CPAN, people typically want something that will get their job done quickly and easily... from the perspective of man-hours. They don't want to have to suss out an arcane interface. Employing common idioms in your library API will help prevent potential users from getting frustrated and seeking out an alternative. Oft times when I'm examining a module for potential use, I cast initial judgment within minutes of glancing over the documented API. If it looks unnecessarily cumbersome, I'll probably say "screw it" and move on, unless the module's functionality is extremely important to me and there are no other viable alternatives.


In reply to Re: Follow the Interface? by skyknight
in thread Follow the Interface? by liz

Title:
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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [Corion]: choroba: Yeah, but handing off the request to Dancer,Plack, Mojolicious,LWP is easy once I have the data filled into some structure ;))
    [choroba]: Algorithm::Loops
    [Corion]: choroba: I'm using that to generate the permutations, but I don't know how the user can pass the intended values to my function in a sane way
    [Corion]: I have a prototype that permutes the get_parameters, but the values used for the get parameters should be different from the values used for the headers and potentially for parts of the URL
    [Corion]: But yes, in general, my approach will be "split the URL into another set of parameters, generate an array of allowed values for each parameter and then NestedLoops() over the set"
    [choroba]: hmm... so you need something like bag from Test::Deep, but not for checking, but for generation
    [Corion]: This has the dual use of easily requesting sequential URLs and also being suitable for testing
    [Corion]: For testing, I want to skip all tests with the same value(s) once one test fails to cut down on the number of failing tests
    [Corion]: choroba: Yes, in a way I
    [Corion]: ... I'm treating the incoming value sets as bags... Maybe I'll just put the burden on the user, at least in the first attempt at a full API. generate( headers => [{ 'Content-Type' => 'text/plain' }, {'Content-Type' => 'text/json' ] ), even ...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (5)
    As of 2017-01-17 08:20 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Do you watch meteor showers?




      Results (152 votes). Check out past polls.