CGI::Ajax - Export perl methods to javascript for AJAX

November 17th, 2007 Arsen Posted in Patterns - Perl |

CGI::Ajax is a perl module to make it trivial to write AJAX scripts using Perl. The module is object-based Perl, and creating a link from a JavaScript event to your Perl code is as easy as defining the JavaScript function name to Perl subroutine name mapping.

  • Can be used to link any Perl code to an HTML event, including fetching other URLs (using LWP, for example).
  • Nestable, so an HTML event can start a chain of AJAX events (e.g. onClick=”do_this(); now_that(); finally_this()”).
  • Can handle GET or POST.
  • Not necessary to have your exported subroutines named in a specific way - you name them what you want.
  • Very small overhead - lets you keep thinking Perl and not get bogged down.
  • Active development community.
  • Open-source library (Perl/Artistic license) by Brian Thomas.

Leave a Reply