.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "SQLite::Work::CGI 3" .TH SQLite::Work::CGI 3 "2008-01-01" "perl v5.8.8" "User Contributed Perl Documentation" .SH "NAME" SQLite::Work::CGI \- Report and update a SQLite database using CGI .SH "VERSION" .IX Header "VERSION" This describes version \fB0.1001\fR of SQLite::Work::CGI. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use SQLite::Work::CGI; .Ve .PP .Vb 1 \& my $obj = SQLite::Work::CGI->new(%args); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is an expansion of SQLite::Work suitable for use in a \s-1CGI\s0 script to report and update a SQLite database. .SH "CLASS METHODS" .IX Header "CLASS METHODS" .Sh "new" .IX Subsection "new" my \f(CW$obj\fR = SQLite::Work\->new( database=>$database_file, row_ids=>{ episodes=>'title_id', }, join_cols=>{ 'episodes+recordings'=>'title_id', } }, report_template=>$report_template, default_format=>{ 'episodes' => { 'title'=>'title', 'series_title'=>'title', } }, input_format=>{ 'reviews' => { 'Review'=>{ type=>'textarea', cols=>60, rows=>4, } } }, max_sort_fields=>10, sort_label=>'Zsort', sort_reversed_prefix=>'Zsort_reversed_', headers_label=>'Zheader_', show_label=>'Zshow', where_prefix=>'Zwhere_', not_prefix=>'Znot_', ); .PP Make a new report object. .PP Takes the same arguments as SQLite::Work::\fInew()\fR plus the following additions: .IP "input_format" 4 .IX Item "input_format" This contains information about what style of input field should be used for this particular column in this table. This is used for the Edit and Add forms. .IP "max_sort_fields" 4 .IX Item "max_sort_fields" The maximum number of sort fields required (default: 10) .IP "sort_label" 4 .IX Item "sort_label" Name of the sort parameter. .IP "sort_reversed_prefix" 4 .IX Item "sort_reversed_prefix" Prefix of the sort-reversed parameters. .IP "headers_label" 4 .IX Item "headers_label" Name of the headers parameter. .IP "show_label" 4 .IX Item "show_label" Name of the columns-to-show parameter. .IP "where_prefix" 4 .IX Item "where_prefix" Prefix of the 'where' parameters. .IP "not_prefix" 4 .IX Item "not_prefix" Prefix of the not-where parameters. .SH "OBJECT METHODS" .IX Header "OBJECT METHODS" .Sh "do_select" .IX Subsection "do_select" $obj\->do_select($table, command=>'Search'); .PP Select data from a table in the database. Uses \s-1CGI\s0 to get most of the parameters. .PP The 'command' is 'Search' by default; if it is something else, then the result generated has edit fields and buttons in it. .Sh "do_single_update" .IX Subsection "do_single_update" Update a single column in a single row, or all columns in a single row. .Sh "do_add_form" .IX Subsection "do_add_form" $obj\->do_add_form($table); .PP Set up for adding a row to the database. .Sh "do_add" .IX Subsection "do_add" Add a row to a table. .Sh "do_single_delete" .IX Subsection "do_single_delete" Delete a single row. .Sh "make_search_form" .IX Subsection "make_search_form" Create the search form for the given table. .PP my \f(CW$form\fR = \f(CW$obj\fR\->make_search_form($table, \f(CW%args\fR); .Sh "do_search_form" .IX Subsection "do_search_form" Display the search form for the given table. .Sh "make_table_form" .IX Subsection "make_table_form" Make the table selection form. .Sh "do_table_form" .IX Subsection "do_table_form" Display the table selection form. .SH "Helper Methods" .IX Header "Helper Methods" Lower-level methods, generally just called from other methods, but possibly suitable for other things. .Sh "print_message" .IX Subsection "print_message" Print an (error) message to the user. .PP $self\->print_message($message); # error message .PP $self\->print_message($message, 0); # non-error message .Sh "search_form" .IX Subsection "search_form" Construct a search-a-table form .Sh "make_add_form" .IX Subsection "make_add_form" Construct an add-a-row form. .Sh "make_buttons" .IX Subsection "make_buttons" Make the buttons for the forms. .Sh "make_page_button" .IX Subsection "make_page_button" Make a button for a particular page .Sh "print_select" .IX Subsection "print_select" Print a selection result. (slightly different for Edits than for Search) .Sh "format_report" .IX Subsection "format_report" Format the report results If 'command' is 'Search' then use the parent format_report; otherwise make an edit\-table. .Sh "make_edit_table" .IX Subsection "make_edit_table" Make a table for editing a search result. .Sh "make_edittext" .IX Subsection "make_edittext" Make a textarea for editing a search result. .Sh "get_input_field" .IX Subsection "get_input_field" Get the required input field for the table+column .SH "REQUIRES" .IX Header "REQUIRES" .Vb 2 \& SQLite::Work \& CGI .Ve .PP .Vb 1 \& Test::More .Ve .SH "INSTALLATION" .IX Header "INSTALLATION" To install this module, run the following commands: .PP .Vb 4 \& perl Build.PL \& ./Build \& ./Build test \& ./Build install .Ve .PP Or, if you're on a platform (like \s-1DOS\s0 or Windows) that doesn't like the \&\*(L"./\*(R" notation, you can do this: .PP .Vb 4 \& perl Build.PL \& perl Build \& perl Build test \& perl Build install .Ve .PP In order to install somewhere other than the default, such as in a directory under your home directory, like \*(L"/home/fred/perl\*(R" go .PP .Vb 1 \& perl Build.PL --install_base /home/fred/perl .Ve .PP as the first step instead. .PP This will install the files underneath /home/fred/perl. .PP You will then need to make sure that you alter the \s-1PERL5LIB\s0 variable to find the modules, and the \s-1PATH\s0 variable to find the script. .PP Therefore you will need to change: your path, to include /home/fred/perl/script (where the script will be) .PP .Vb 1 \& PATH=/home/fred/perl/script:${PATH} .Ve .PP the \s-1PERL5LIB\s0 variable to add /home/fred/perl/lib .PP .Vb 1 \& PERL5LIB=/home/fred/perl/lib:${PERL5LIB} .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1). .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to the author. .SH "AUTHOR" .IX Header "AUTHOR" .Vb 3 \& Kathryn Andersen (RUBYKAT) \& perlkat AT katspace dot com \& http://www.katspace.com .Ve .SH "COPYRIGHT AND LICENCE" .IX Header "COPYRIGHT AND LICENCE" Copyright (c) 2005 by Kathryn Andersen .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.