Perl software?

Discussion in 'Perl Misc' started by amerar@iwc.net, May 19, 2008.

  1. Guest

    Hi,

    we have some data in a MySQL database. We're looking for a way to
    somehow query that data and present it in a line graph which will be
    emailed to the users......I'm assuming that the document will be an
    HTML document.

    Are there utilities or Perl modules for this? We're running Linux
    (Cent-OS).

    Thank you......
     
    , May 19, 2008
    #1
    1. Advertising

  2. Guest

    "" <> wrote:
    > Hi,
    >
    > we have some data in a MySQL database. We're looking for a way to
    > somehow query that data


    DBI and DBD::mysql

    > and present it in a line graph


    GD::Graph, or Image::Magick, or Chart::Graph::Gnuplot, etc.

    You might be able to use DBIx::Chart to combine both the selecting
    and the graphing in fell swoop. Never used it myself, and I tend to
    prefer focussed tools rather than one thing to do everything.


    > which will be
    > emailed to the users......I'm assuming that the document will be an
    > HTML document.


    For the simple type of mail I do, I just open a pipe to the mail program,
    but there are all kinds of modules that can help with more complicated
    stuff. HTML usually refers one to a URL to get the image, so if you need
    the image itself to be embedded in the mail, you probably need MIME or
    something more complicated than just plain HTML.

    perldoc -q mail
    How do I use MIME to make an attachment to a mail message?

    This suggests MIME::Lite

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    The costs of publication of this article were defrayed in part by the
    payment of page charges. This article must therefore be hereby marked
    advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
    this fact.
     
    , May 19, 2008
    #2
    1. Advertising

  3. J. Gleixner Guest

    wrote:
    > "" <> wrote:
    >> Hi,
    >>
    >> we have some data in a MySQL database. We're looking for a way to
    >> somehow query that data

    >
    > DBI and DBD::mysql
    >
    >> and present it in a line graph

    >
    > GD::Graph, or Image::Magick, or Chart::Graph::Gnuplot, etc.
    >
    > You might be able to use DBIx::Chart to combine both the selecting
    > and the graphing in fell swoop. Never used it myself, and I tend to
    > prefer focussed tools rather than one thing to do everything.
    >
    >
    >> which will be
    >> emailed to the users......I'm assuming that the document will be an
    >> HTML document.

    >
    > For the simple type of mail I do, I just open a pipe to the mail program,
    > but there are all kinds of modules that can help with more complicated
    > stuff. HTML usually refers one to a URL to get the image, so if you need
    > the image itself to be embedded in the mail, you probably need MIME or
    > something more complicated than just plain HTML.
    >
    > perldoc -q mail
    > How do I use MIME to make an attachment to a mail message?
    >
    > This suggests MIME::Lite


    Very good answer. I'd just like to add that to get and install
    these modules, you might want to read about using CPAN:

    perldoc -q cpan
     
    J. Gleixner, May 19, 2008
    #3
  4. Guest

    On May 19, 3:58 pm, wrote:
    > "" <> wrote:
    > > Hi,

    >
    > > we have some data in a MySQL database. We're looking for a way to
    > > somehow query that data

    >
    > DBI and DBD::mysql
    >
    > > and present it in a line graph

    >
    > GD::Graph, or Image::Magick, or Chart::Graph::Gnuplot, etc.
    >
    > You might be able to use DBIx::Chart to combine both the selecting
    > and the graphing in fell swoop. Never used it myself, and I tend to
    > prefer focussed tools rather than one thing to do everything.
    >
    > > which will be
    > > emailed to the users......I'm assuming that the document will be an
    > > HTML document.

    >
    > For the simple type of mail I do, I just open a pipe to the mail program,
    > but there are all kinds of modules that can help with more complicated
    > stuff. HTML usually refers one to a URL to get the image, so if you need
    > the image itself to be embedded in the mail, you probably need MIME or
    > something more complicated than just plain HTML.
    >
    > perldoc -q mail
    > How do I use MIME to make an attachment to a mail message?
    >
    > This suggests MIME::Lite
    >
    > Xho
    >
    > --
    > --------------------http://NewsReader.Com/--------------------
    > The costs of publication of this article were defrayed in part by the
    > payment of page charges. This article must therefore be hereby marked
    > advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
    > this fact.



    GD:Graph looks like a pain in the ass to install. There seems to be
    so many libraries and modules that are needed. I may look at
    Chart::Graph::Gnuplot instead and see if that is easier.......
     
    , May 20, 2008
    #4
  5. Ted Zlatanov Guest

    On Mon, 19 May 2008 13:40:35 -0700 (PDT) "" <> wrote:

    an> we have some data in a MySQL database. We're looking for a way to
    an> somehow query that data and present it in a line graph which will be
    an> emailed to the users......I'm assuming that the document will be an
    an> HTML document.

    an> Are there utilities or Perl modules for this? We're running Linux
    an> (Cent-OS).

    While you can use Class::DBI or Rose::DB::Object to query the database
    and GD::* to plot the data, you may want to look at reporting tools that
    are written to do exactly this task.

    For example, rrdtool is very good for generating line graphs of any
    data. If it's complicated or if you need a GUI, you can try Cacti,
    which is a good wrapper around it. In either case, all you write is the
    data retrieval code (in Perl or in another language), but then rrdtool
    or Cacti+rrdtool take care of organizing it by date and time, plot
    details, etc.

    There are also report generators that take a query and do everything
    else for you. That's an even easier option if it fits your needs.

    Ted
     
    Ted Zlatanov, May 20, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page