If you want something really simple to expose your module as a Web Service I would use HTTP::Server::Simple::CGI. Note that the vanilla module can only attend one requst at a time, but you also add Net::Server for forking.

I would personally avoid the use of SOAP, XMLRPC and alike. IMHO these protocols add a lot of useless overhead and create all sorts of security issues. Since to properly apply security measures you have to inspect each package and understand it's contents, just to mention one of many flaws.

To expose code correctly over HTTP, I would highly recommend to learn and use HTTP (Representational_State_Transfer) for what it was designed, and map the HTTP semantics to your api, avoiding the use of HTTP as a transport protocol, instead of tranfer.

Basically this boils down to:

If you follow these simple recommendations your Web Services will be secure, simple, elegant, swift, and highly scallable.


In reply to Re: Convert Perl module to Web Service? by ait
in thread Convert Perl module to Web Service? by tpederse

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, details, 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, summary, 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.