Hakan Ardo > DBIx-HTMLView > DBIx::HTMLView::CGIView



Annotate this POD


New  2
Open  0
View/Report Bugs


  DBIx::HTMLView::CGIView - Common CGI functions for the viewers


package MyCGIViewer

require DBIx::HTMLView::CGIView; @ISA = qw(DBIx::HTMLView::CGIView);

sub new { my $self=DBIx::HTMLView::CGIView::new(@_);

  # ...


This class some basic functions that can be used to create cgi interfaces to a HTMLView database. And is therefor suited as a base class for viewr or edit classes.


$view=DBIx::HTMLView::CGIView->new($script, $db, $cgi)

Creates a new CGIView object that will use the url $script for future requests to the database $db (a DBIx::HTMLVIew::DB object) and $cgi is the CGI object containing the request we got from the user.

$view->script =head2 $view->script_name

Returns the name of the script we should use for future calls as set by the $script param to the constructor.

$view->lnk =head2 $view->link_data

Returns a string that can be included in a link that will set the params that is supposed to be presistand between requests. Curent that is: _Table, the name of the table we are currently working on, _usr, the user name, and _pw, the password used to access the database.


Will return the same data as $view->link_data but in form of <input type=hidden ...> tags to be included in a html form instead.


Returns the database (a DBIx::HTMLView::DB object) we'r using, as set by the $db parameter to the constructor.


Returns the CGI object as set by the $cgi parameter to the constructor.


Returns true if the CGI object was set by the $cgi parameter to the constructor.


Returns the table (a DBIx::HTMLView::Table object) we're currently working with. Either as specified in the CGI query or the first table found in the database if none was defined.

syntax highlighting: