Installing Web::Simple on Debian Squeeze

December 4, 2009
Tags: ,

OH HAI!

This is a short article / post on installing Web::Simple on Debian’s testing version codenamed Squeeze.

Sometimes you may not need all the powerful tools that are bundled into Catalyst, the perl web framework. But you may want to use a module or two from the CPAN that you can be reasonably sure is tested and follows some best practices. Web::Simple might be that. It is written by notorious perl gadfly Matt Trout, and whatever one says about his profane grandeloquence, one must admit he writes valuable modules for perl. So let’s take it for a spin while noting that it is new so we oughtn’t complain too loudly if things break.

The first thing we need to do is to install Web::Simple and we’ll need to go to CPAN to get it since it is not packaged for debian. I just used cpan to install;

cpan -i Web::Simple

Now, lets test it out using the synopsis! One of the great advantages of perl is that there is often working code in the synopsis of a perl module on CPAN, I am just going to take the synopsis and put it into a file, chmod the file to 755, and run it. If I run it from the command line first, like this;

./web-simple

I get this message:

“No path passed – use ./web-simple / for root at
/usr/local/share/perl/5.10.1/Web/Simple/Application.pm line 249.”

So I re-run my program (web-simple) the way they recommend, with a “/” and viola, a 200 status message!

./web-simple /
HTTP/1.1 200 OK
Date: Fri, 04 Dec 2009 11:41:57 GMT
Content-Length: 12
Content-Type: text/plain
Status: 200

Hello world!

Now this might not be useful enough to write a shopping cart, but it certainly is a handy module to sketch out ideas and make some prototypes without having to set up an entire Catalyst installation. Good stuff, thanks Matt!

2 Responses to “Installing Web::Simple on Debian Squeeze”

  1. […] Read more:  Note to self » Installing Web::Simple on Debian Squeeze […]

  2. […] article / post on installing Web::Simple on Debian’s testing version codenamed Squeeze. More here Sometimes you may not need all the powerful tools that are bundled into Catalyst, the perl web […]