Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

  (email not shown publicly)
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Sunday April 09, 2006
03:15 PM

Class::CGI to the CPAN

[ #29269 ]

I have just uploaded Class::CGI 0.03 to the CPAN. It should be there soon. Basically, it lets you treat form data as a collection of objects. It's very easy to use and extend. You can now set up a profile file which is a centralized spot for your handler declarations (these tell which CGI parameters get mapped to which objects). You can now do things like this:

use Class::CGI
  profiles => $location_of_profile_file,
  use      => [qw/ order_date order /];

my $cgi = Class::CGI->new;
my $order = $cgi->param('order');
my $onum  = $order->number;

Because of the new profile file, larger sites can share this behavior across all of their code without worrying about duplication. Of course, you can also set profiles on a "per instance" basis rather than worry the global effects shown above. You'll want to see the docs or this Perlmonks thread for more information.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.