I would suggest DBIx::Class, Fey::ORM or Rose::DB::Object. They are all excellent modules, fully OOP and all will do everything you want and more, allowing for your application to grow. However, if you feel you want to write this from scratch here are a few CPAN modules you will want to look at.

1. connect/disconnect to/from oracle/mysql database.

Obviously you need DBI, but I also recommend using DBIx::Connector to manage your DB connections, it is battle tested code that has been extracted from DBIx::Class and will just make your life easier.

2. query tables and return data.

You really don't need anything more then DBI to do this, but you might want to look at Fey and in particular Fey::SQL as it is a nice way to manage your tables and have proper SQL generated for you. To make things a little easier when querying, you can take a look at FeyX::Active, which just wraps Fey::SQL (see the SYNOPSIS for details)

3. process data and create relevant html reports.

Well you will probably want Template to do HTML templating to create your reports with, and if you need to do any charts or graphs, I highly recommend Chart::Clicker. For data processing, well that is what Perl does best, but you might want to check out a few really useful CPAN modules like List::AllUtils and Data::Visitor::Callback.

-stvn

In reply to Re: Creating Moose Classes to Interact with mySQL/Oracle by stvn
in thread Creating Moose Classes to Interact with mySQL/Oracle by hmadhi

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.