John Gorman > DBIx-CodeKit-1.07 > DBIx::CodeKit

Download:
DBIx-CodeKit-1.07.tgz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.07   Source  

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 ]
         options       => 'onchange="submit()"'

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.

The code administration page lets you define new virtual code tables and enter all codes and their descriptions. Perl and PHP classes retrieve the code descriptions and automatically generate HTML code selection elements.

For news and updates visit the CodeKit home page:

http://www.webbysoft.com/codekit

SEE ALSO ^

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 same terms as Perl or the LGPL.

syntax highlighting: