DBIx::HTML::PopupRadio is a Perl module to convert SQL into a popup menu or radio group.
Synopsis
use DBIx::HTML::PopupRadio;
my($popup_object) = DBIx::HTML::PopupRadio -> new
(
dbh => $dbh,
sql => 'select campus_id, campus_name from campus order by campus_name',
);
$popup_object -> set(default => '1');
my($popup_menu) = $popup_object -> popup_menu();
my($radio_group) = $popup_object -> radio_group();
print $popup_menu;
This module takes a db handle and an SQL statement, and builds a hash.
Then you ask for that hash in HTML, as a popup menu or as a radio group.
The reading of the db table is delayed until you actually call one of the methods 'popup_menu' or 'radio_group'. Even then, it is delayed until any parameters passed in to these 2 methods are processed.
After a call to one of these 2 methods, you can call the 'size' method if you need to check how many rows were returned by the SQL you used.
Neither the module CGI.pm, nor any of that kidney, are used by this module. We simply output pure HTML.
Product's homepage
Requirements:
· Perl
What's New in This Release: [ read full changelog ]
· Remove text 'All rights reserved' (for Debian licensing).
· Remove POD heads 'Required Modules' and 'Changes'.