Ajax + Perl

Basic AJAX

You must be asking yourself: What is AJAX ? And why should I use it ?
AJAX stands for Asynchronous XML and JavaScript. It can be used ina variety of ways: it helps you to minimise network traffic, make your web applications run lightning-fast, and many more.
This article will show you how AJAX can be used to minimize traffic overhead by loading only the piece of page you without reloading all that extras.
0. Prerequisite Perl modules
DBI - a database framework
DBD::SQLite - a small, but lightning-fast RDBMS engine and DBI's database driver

Perl AUTOLOAD sub

There's a wonderful feature in Perl named AUTOLOAD sub. It is a 'last-resort' function that tries to find sub definition if searching in the inheritance tree is failed.
One of the most common uses of AUTOLOAD is to compile some sub 'on-the-fly', on the first call. Using AUTOLOAD is a common way to implement TONS of getters/setters or to compile-on-demand some rarely-used subs.
It is also a pretty common case for JavaScript programmers wheh code grows way too big, and even splitting it in a separate .js files does not help much. Then, maybe, AUTOLOAD-like strategy will help.

Syndicate content