NAME

DBIx::CodeKit - Universal Code Table Interface

SYNOPSIS

 use DBIx::CodeKit;

 my $ck = new DBIx::CodeKit($dbh,
                table     => 'ck_code',
                getparam  => sub { $cgi->param(shift) },
                getparams => sub { $cgi->param(shift.'[]') }
                );

Get code descriptions safe for HTML display

 $str = $ck->desc(   $code_set, $code_code);
 $str = $ck->ucfirst($code_set, $code_code);
 $str = $ck->ucwords($code_set, $code_code);

Get code descriptions not safe for HTML display

 $str = $ck->data(  $code_set, $code_code);

HTML select common options

        var_name      => 'start_day'
        value         => $start_day
        default       => 1
        subset        => [ 1, 2, 3, 4, 5 ]

HTML select single value methods

 $str = $ck->select($code_set,
        select_prompt => "Code set description?",
        blank_prompt  => "None"
        );

 $str = $ck->radio($code_set,
        blank_prompt  => "None",
        sep           => "<br>\n"
        );

HTML select multiple value methods

 $str = $ck->multiple($code_set,
        size          => 10
        );

 $str = $ck->checkbox($code_set,
        sep           => "<br>\n"
        );

Code sets

 $rows = $ck->code_set($code_set);

Code table updates

 $ck->remove($code_set, $code_code);

 ( $code_desc, $code_order, $code_flag ) =
   $ck->get($code_set, $code_code);

 $ck->put($code_set, $code_code,
          $code_desc, $code_order, $code_flag);

DESCRIPTION

CodeKit is an interface to a universal database code table. CodeKit takes all of the programming work out of maintaining multiple database code definition sets.

No database project should be without one!

For news and updates visit the CodeKit home page:

http://www.webbysoft.com/codekit

For a full featured multilingual universal code table visit the BabelKit home page:

http://www.webbysoft.com/babelkit

AUTHOR

Contact John Gorman at http://www.webbysoft.com to report bugs, request features, or for database design and programming assistance.

COPYRIGHT

Copyright (C) 2003 John Gorman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the GNU General Public License (GPL) of the Free Software Foundation.

As a practical matter this means that you can use this software in house or as part of your web site. If you want to distribute this as part of a proprietary package ask me for a commercial license.