3

I have simple Perl/CGI scripts based web server which is mainly used to display graphs and images. I am looking to make it more technical and come to know about Catalyst. I have installed all the required Perl modules on my test platform and created an application called myweb. Also, I am going through the Catalyst documents to reach my goal but nothing helpful yet.

  1. Is Catalyst helpful to display images/graphs on web?
  2. How can I use my existing CGI/Perl scritps with Catalyst?

Any example would be really appreciated.

brian d foy
  • 129,424
  • 31
  • 207
  • 592
Space
  • 7,049
  • 6
  • 49
  • 68

3 Answers3

1

Is Catalyst helpful to display images/graphs on web?

Whatever you currently do in your CGI script will also work in same way within Catalyst (view).

However you can improve/change your method by using an already prescribed Catalyst::View from CPAN.


How to use my existing cgi/perl scritps with Catalyst?

You can just embed your CGI script within Catalyst using Catalyst::Controller::CGIBin

However to get the full benefits of Catalyst MVC then it would be better to rewrite you CGI script into necessary component parts (Model, View & Controller).

AndyG
  • 39,700
  • 8
  • 109
  • 143
draegtun
  • 22,441
  • 5
  • 48
  • 71
1

Check out Catalyst::View::Graphics::Primitive for graphics stuff Catalyst.

dhoss
  • 160
  • 6
1

I personally use Catalyst::View::Jemplate

This keeps my controller logic completely independent of what type of graph/chart API I use. In fact, I change the graph look and feel every few months just because i can..

nbprithv
  • 46
  • 4