Perl on Rails

BBC developers has announced its own Perl MVC framework – Perl on Rails. As you can understand from its name the new framework is similar to Ruby on Rails. The BBC Programmes was developed using the Perl on Rails.

Actually, there is a few Perl MVC frameworks like Catalyst, Ganty, Maypole or Jifty. If Perl on Rails will be released as open source it’ll make the popular program language more attractive to develop enterprise applications.

Talk with you PC

Perlbox Voice

If you’d like to control your Linux PC using voice commands than Perlbox Voice is what do you need. It’s a pure Perl application which features:

  • Text to speech (Thanks to the Festival speech synthesizer)
  • Voice control to open user specified applications. For example, if you say “Web”, the Perlbox-Voice Control will open the browser of your choice.
  • Desktop plugins to control your Linux desktop using only your voice. You can switch virtual screens, cycle through desktops, invoke the run dialog, quick lock the screen. Currently there is a plugin for KDE.
  • Custom commands are fully supported, and you can add commands on the fly.
  • ‘Pseudo Commands’ allow you to enter commands that the speaker should say. For example, if you say “Good morning”, the computer voice could say “And good morning to you”. It’s all up to you.
  • The best thing is that you don’t have to train the listening agent. The sphinx2 backend can be used by multiple people on the same machine without reconfiguration. It is also robust to background noise and ambient sound.
  • Easy to use and attractive interface built with Perl and Perl-Tk.
  • Uses to Festival Speech Synthesizer backend for text to speech and speaking functionality.

Welcome to open source

Movabletype

Open source is the future of software IMHO. Many of you know Movable Type – Perl platform to create blogs or sites. Today it started be completely open source! When I decided to move my blog from Nucleus I thought about Movable Type because it was based on Perl. But I chose WordPress because it’s free (and I don’t regret :)). I suspect that popularity of Wodpress pushed Moviable Type change its license to GPL.

Improve Your Perl Programming

Brian Foy – the author of Mastering Perl and one of the famous perlmonks, wrote an article on the ONLAMP where described five ways to improve Perl programming:

  • Cleaning up your code – I also hate to read unformatted code -without tabs, proper style etc.
  • Use configuration – sure, my favorite module – Config::General.
  • Logging – log4perl should be used in all your applications.
  • Persistence – Brian suggested to use Storable or DBM::Deep but I prefer to use Cache::FileCache (it’s used in my module IMDB::Film to cache already retrieved web content).
  • Subclasses for applications – it’s good practice to implement a common functionality in the modules instead of keeping it in your script. This approach allows to have more structured application and reuse the same functionality in some other scripts.

So, generally I didn’t find anything new for me in those recommendations. I just confirmed my own point of view 🙂

Building Web Applications with Gantry and Bigtop

null
Here is a new book – Building Web Applications with Gantry and Bigtop, which describes all aspects to develop Perl powered web applications using modern Perl framework Gantry and its part – a web application data language processor Bigtop:

Gantry and Bigtop make starting a Perl powered web application almost painless. After initial start up, they are the tools you need to implement complex applications using the full power of Perl and its famous CPAN code archive during your code’s full life cycle.

Basically, this book is tutorial and reference in one. It should be enough to start your first Gantry application. You can choose between traditional paperback book ($20.95) and moder ebook ($6.25).
For more information see the Gantry project page.

Perl Oneliner: Recursive Search and Replace

I like Perl and I use it every day. It’s cool to make a simple scripts in one line to do some routine work. For example, my first Perl oneliner formats Apache log to be easy readable. Here is another good example of Perl onliner (it isn’t my actually). It makes a recursive search and replacement:
Perl -p -i -e 's/oldstring/newstring/g' `grep -ril oldstring *`

[via About: Perl]

use Net::Stomp

Some of you know about ActiveMQ – an open source (Apache 2.0 licensed) Java Message Service 1.1 (JMS) message broker packed with many enterprise features. One of the way to communicate with it from none-Java programm languages is STOMP (Streaming Text Orientated Messaging Protocol). STOMP is very simple and looks like HTTP-protocol.
Perl has at least two ways to communicate with ActiveMQ over STOMP:

Using ActiveMQ may help you to integrate your applications with others on Enterprise level.

Develop right CGI scripts

I came across Ovid’s CGI Course. It’s definitely good tutorial. Both experts and beginners will find there something interesting and helpful. I found the third part – Basic Security the most important and interesting for me. I’d like to add that you can find many useful extensions for CGI like CGI::Forms, for example. This module will do all routine work for you to produce web forms. Or here is a CGI::Framework – a simple-to-use, lightweight web CGI framework.
But notice that using plain CGI is defensible in case of simple web script. If you’re going to develop something serious have a look some Perl framework such Catalyst, Gantry or Maypole. They’re enough powerful to be a base of scalable and efficient web applications.