Perl software?

A

amerar

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......
 
X

xhoster

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.
 
J

J. Gleixner

DBI and DBD::mysql


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.



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
 
A

amerar

DBI and DBD::mysql


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.


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.......
 
T

Ted Zlatanov

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top