If you want a nice table format, simple to get started, <span></span>check out <a href="http://datatables.net">datatables.net</a> JQurry plugin.<div><br></div><div>I used Dancer, Template Toolkit, JQuery and the Datatables plugin. Backend was Moose and Bread::Board. Run on Linux with DBD::Sybase to connect to SQLServer. The flavor of DB matters least of all, I believe.</div><div><br></div><div>I chose Dancer because it was the quickest way to get started for me at least. As it grew, the templating of the JavaScript got a little hairy, but not too bad.</div><div><br></div><div><br>On Thursday, March 26, 2015, Jim Thomason <<a href="mailto:jim@jimandkoka.com">jim@jimandkoka.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'd say that using Catalyst or any other MVC framework (my camp in this religious debate would be Mojolicious) is way overkill, especially for an initial simple pass. If you just want to get something braindead simple up and running lightning fast...<div><br></div><div>1) Get some sort of web server installed and configured. apache/nginx/one of the myriad perl servers, whatever. Ask your friendly local sysadmin for help and/or suggestions, if necessary. And as always, be concerned about security if this is public facing.</div><div><br></div><div>2) Enable CGI in some manner - this is usually either enabling scripts in a certain directory, or things with a .cgi extension to be executable.</div><div><br></div><div>3) your cgi script is more or less the same as a command line script. If you're going to output just plain text (as you would have if you were sending to the screen or piping it to a file), just add this to the top:</div><div><br></div><div>print "Content-type: text/plain\n\n";</div><div><br></div><div>And you're done. That'll spit it out to the web and it'll look exactly the same as if you were sending it to a file. HTTP communication is really easy if you skirt a few of the rules - it really just needs a Content-type header so the browser knows the type of data it's receiving. There's more that you -should- do, and I don't suggest you do the above as a production run, but to get your feet wet and up and going, this'll have you spitting out text to the browser in under an hour.</div><div><br></div><div>...and now that the simple start up pleasantries are out of the way...</div><div><br></div><div>First of all, you need to worry about security - make sure that the user can't send in arbitrary SQL queries to your server, ESPECIALLY if it's not firewalled off for only authorized users. The last thing you'd need is an open arbitrary SQL gateway that allows any black hat to come in and run an insert/update/drop table/alter table statement. This task is potentially non-trivial, but at a minimum, don't write it to accept arbitrary SQL from the browser.</div><div><br></div><div>The CGI module is pretty popular for the IO requirements here. There are myriad other derivatives - CGI::Lite, CGI::Minimal, etc. Use whatever's handy. That'll give you better header handling, and simpler processing for reading in options passed by the user.</div><div><br></div><div>Next, to pretty it up, templating libraries like Text::Template or HTML::Template can help layout an interface for you.</div><div><br></div><div>You may need login/user capabilities. You can do that with CGI and templating yourself, but it's a lot of infrastructure you need to set up. One of the frameworks may be more useful for you at this point.</div><div><br></div><div>Nowadays, it's also very trendy to have your web front ends be javascript apps that handle all the layout and interface, and your communication back and forth to the server is all done by handing JSON objects or XML. So you might want to look into that as well. On the one hand, it makes the web front end more complicated and brings in different languages, but on the other it can keep the server side a lot simpler if you're only handing data structures back and forth to the client and letting the client side handle all the interaction.</div><div><br></div><div>-Jim...</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 26, 2015 at 9:30 AM, Alan Mead <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','amead2@alanmead.org');" target="_blank">amead2@alanmead.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Richard,<br>
    <br>
    I think that most people will tell you to use a web-based framework
    and some of them are optimized for this.  <br>
    <br>
    But it's pretty simple to create a single-page CGI that displays
    some data and there are many examples available online.  I find
    HTML::Template to have a fairly easy interface for creating HTML
    tables from DBI queries. Probably a key issue is how much other
    infrastrcture you need.  For example, if people need to login,
    that's going to make a simple CGI a bad idea.<br>
    <br>
    -Alan<div><div><br>
    <br>
    <br>
    <div>On 3/26/2015 8:59 AM, Richard Reina
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      <div dir="ltr"><br>
        <div class="gmail_quote">---------- Forwarded message ----------<br>
          From: <b class="gmail_sendername">Richard Reina</b> <span dir="ltr"><<a href="javascript:_e(%7B%7D,'cvml','gatorreina@gmail.com');" target="_blank">gatorreina@gmail.com</a>></span><br>
          Date: 2015-03-26 8:15 GMT-05:00<br>
          Subject: Perl MySQL question<br>
          To: <a href="javascript:_e(%7B%7D,'cvml','chicago-talk@pm.org');" target="_blank">chicago-talk@pm.org</a><br>
          <br>
          <br>
          <div dir="ltr">
            <div>
              <div>Hello All,<br>
              </div>
              <div><br>
                What would be the easiest way to display query results
                from a MySQL database -- running on a Debian machine --
                onto a webpage. What I would like is to allow a user to
                log in and be able to do a few simple queries. I know
                enough perl and SQL to write the queries via
                perl->DBI but I have never done any web programing.
                What I mean is that I have written a lot of perl
                programs that query databases and display the results on
                a console screen via curses but never displayed results
                onto the www. I'm guessing that I might need to install
                Apache but really have no clue beyond that. <br>
                <br>
                <br>
              </div>
              <div>PS It does not have to be anything fancy.<br>
                <br>
              </div>
              Any help would be greatly appreciated.<span><font color="#888888"><br>
                  <br>
                </font></span></div>
            <span><font color="#888888">Richard<br>
              </font></span></div>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><span><pre>_______________________________________________
Chicago-talk mailing list
<a href="javascript:_e(%7B%7D,'cvml','Chicago-talk@pm.org');" target="_blank">Chicago-talk@pm.org</a>
<a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a></pre>
    </span></blockquote>
    <br>
    <pre cols="72">-- 

Alan D. Mead, Ph.D.
President, Talent Algorithms Inc.

science + technology = better workers

+815.588.3846 (Office)
+267.334.4143 (Mobile)

<a href="http://www.alanmead.org" target="_blank">http://www.alanmead.org</a>

Announcing the Journal of Computerized Adaptive Testing (JCAT), a
peer-reviewed electronic journal designed to advance the science and
practice of computerized adaptive testing: <a href="http://www.iacat.org/jcat" target="_blank">http://www.iacat.org/jcat</a></pre>
  </div>

<br>_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="javascript:_e(%7B%7D,'cvml','Chicago-talk@pm.org');" target="_blank">Chicago-talk@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br></blockquote></div><br></div>
</blockquote></div><br><br>-- <br>Regards,<br>Sean<br><br><div>Sean Blanton</div><div><a href="mailto:sean@blanton.com" target="_blank">sean@blanton.com</a></div><br>