Sometimes you want to place a Gantry controller at the base location ( "/" ) of your web server, but you don't want it to execute for every image, js, css, etc. A simple solution is to short circuit the dispatching by using LocationMatch and adding the exclusions.
Java has inspired me to think about Perl testing in a Java like fashion. I've always been a fan of placing tests into the class, as opposed to a separate test script. To accomplish this style of testing I used Test::Builder and since it's a Singleton the tests can easily work together or work independently.
Checkout Phil's latest article posted on ONLamp.
A Holiday Application
The Linux magazine article about building applications with Gantry is now online.
These captchas are different from most. Basically, using Gantry::Utils::Captcha you define a set of thumbnail images along with some other properties. The util will hand you a random captcha ( be sure to shuffle ) and then it's up to you to place it on the form. When the form is displayed, the user is required to select the correct text for the current captcha. Below is a code sample where I'm using the captcha util.
The Gantry book is now available on Lulu.
It is sometimes desirable and possibly a must to cache data between page accesses. Enabling a persistent cache will speed up the Gantry internals and will give you the option to cache at will.
Here is a controller that generates a registration form. This controller pulls in a form from another controller (Apps::Store::GEN::User::form) using Gantry::Utils::FormMunger and adds in the special constraints.
This site was created with Gantry and Bigtop. I'm sharing the bigtop kickstart file, the bigtop file itself and the Source distribution. The kickstart file was used to create the bigtop file, and the bigtop file was used to create the application. Not much to it. See usegantry.org for more information.
Here are some code snippets dealing with a JQuery date select plugin and Gantry.
I stumbled across a light weight javascript toolkit called JQuery. I'm hoping this will be a great replacement for the bloated, slow loading Dojo toolkit. JQuery has an extremely likable shorthand notation and appears to be lightning fast.
Here is a simple code snippet that demonstrates three-way table join management using Gantry::Utils::Threeway.
I've recently made a change to Gantry::Conf which allows for the nesting of configuration variables. In this example I have defined a sample_instance where I want to pull in the correct site wrapping depending on uri location. However, I don't want to specify a wrapping for each location, because I'm lazy. I just want to specify the lowest, most common location and set the wrapping there. This is where the nesting helps out.
A 2 minute movie and 5 minute movie screencast to help get started using Gantry and Bigtop.
A Perl web application framework for Apache/mod_perl, CGI and Fast-CGI. Object oriented design allows for a pragmatic, modular approach to URL dispatching. Supports MVC and initiates rapid development, offering an organized coding scheme for web applications.