CGI-QuickForm

 view release on metacpan or  search on metacpan

eg/example3  view on Meta::CPAN

    # Paths.
    $_ .= qq{<tr><td colspan="2"><b>Paths:</b></td></tr>} ;
    my %path = %{ thaw( $Data{"$PREFIX PATH"} ) } ;
    foreach my $key ( sort keys %path ) {
        my $path = join ", ", split /:/, $path{$key} ;
        $_ .= qq{<tr><td>$key </td><td>$path</td></tr>} ;
    }

    $_ .= qq{<tr><td><i>database</i> </td><td>$DB_FILE</td></tr>} ;

    $_ .= qq{<tr><td><i><b>Program:</b></i> </td><td>$URL</td></tr>} ;

    $_ .= qq{<tr><td><i><b>Del cache:</b></i> </td><td>$Data{"$PREFIX DEL_CACHE"}} .
          qq{</td></tr>} ;

    $_ .= qq{<tr><td><i><b>Max Terms:</b></i> } .
          qq{</td><td>$Data{"$PREFIX MAX_TERMS"}</td></tr>} ;

    my $pagetype = join ", ", sort @{ thaw( $Data{"$PREFIX PAGETYPE"} ) } ;
    $_ .= qq{<tr><td><i><b>Page types:</b></i> </td><td>$pagetype</td></tr>} ;

    $_ .= "</table>" ;
}

BEGIN {

    $URL = url() ;

    $PREDEFINED_PAGES = <<__EOT__ ;
<a href="$URL?type=info\&term=.info">Info pages</a>&nbsp;&nbsp;
<a href="$URL?type=doc\&term=.">/usr/doc</a>&nbsp;&nbsp;
<a href="$URL?type=doc\&term=HOWTO">HOWTO</a>&nbsp;&nbsp;
<p>
<a href="$URL?type=man\&term=1.">
man 1\&nbsp;\&nbsp;\&nbsp;Executable programs or shell commands</a><br />
<a href="$URL?type=man\&term=1d.">
man 1db\&nbsp;DB</a><br />
<a href="$URL?type=man\&term=1p.">
man 1p\&nbsp;\&nbsp;Perl Functions</a><br />
<a href="$URL?type=man\&term=1x.">
man 1x\&nbsp;\&nbsp;X Executable programs or shell commands</a><br />
<a href="$URL?type=man\&term=2.">
man 2\&nbsp;\&nbsp;\&nbsp;System calls</a> (functions provided by the kernel)<br />
<a href="$URL?type=man\&term=3.">
man 3\&nbsp;\&nbsp;\&nbsp;Library calls</a> (functions within system libraries)<br />
<a href="$URL?type=man\&term=3paper">
man 3paper\&nbsp;Paper related</a><br />
<a href="$URL?type=man\&term=3pm.">
man 3pm\&nbsp;Perl Modules</a><br />
<a href="$URL?type=man\&term=4.">
man 4\&nbsp;\&nbsp;\&nbsp;Special files</a> (usually found in /dev)<br />
<a href="$URL?type=man\&term=5.">
man 5\&nbsp;\&nbsp;\&nbsp;File formats and conventions</a> eg /etc/passwd<br />
<a href="$URL?type=man\&term=5vga.">
man 5vga\&nbsp;VGA File formats and conventions</a><br />
<a href="$URL?type=man\&term=5x.">
man 5x\&nbsp;\&nbsp;X File formats and conventions</a><br />
<a href="$URL?type=man\&term=6.">
man 6\&nbsp;\&nbsp;\&nbsp;Games</a><br />
<a href="$URL?type=man\&term=7.">
man 7\&nbsp;\&nbsp;\&nbsp;Macro packages and conventions</a> eg man(7), groff(7)<br />
<a href="$URL?type=man\&term=7vga.">
man 7vga\&nbsp;VGA Macro packages and conventions</a><br />
<a href="$URL?type=man\&term=8.">
man 8\&nbsp;\&nbsp;\&nbsp;System administration commands</a> (usually only for root)<br />
<a href="$URL?type=man\&term=9.">
man 9\&nbsp;\&nbsp;\&nbsp;Kernel routines</a><br />
<hr />
__EOT__

}

__END__

=head1 NAME

linux-help - CGI program for looking up help text, e.g. man and info pages on localhost

=head1 DESCRIPTION

A single source for looking up help via a browser on linux systems. 

It will search for and render man pages, info pages and perl pod pages, as
well as any html pages you want. It is slower than systems like dwww because
it doesn't cache and searches dynamically - but you never have to update
anything or pre-index because of this dynamism.

(Note that if you enter a New Term you don't have to change Search/Show to New
Term - linux-help will figure it out.)

You will need to place linux-help in your cgi-bin directory and change the
\$DB_FILE file to a path and filename of your choice. Non-Debian users will
have to change the paths stored in the \$PATH_* variables. See the beginning
of the code for these.

=head1 README

CGI program for looking up help text, e.g. man, info and pod pages on localhost.
It is slower than systems like dwww because
it doesn't cache and searches dynamically - but you never have to update
anything or pre-index because of this dynamism.

=head1 PREREQUISITES

C<strict>
C<CGI>
C<CGI::QuickForm>
C<DB_File> 
C<Fcntl>
C<File::Find>
C<HTML::Entities>
C<Storable>
C<URI::Escape>

=head1 COREQUISITES

=head1 COPYRIGHT

Copyright (c) Mark Summerfield 1999-2000. All Rights Reserved.
May be used/distributed under the GPL.
Email <summer@perlpress.com> with 'linux-help' in the subject line.

=head1 OSNAMES



( run in 0.510 second using v1.01-cache-2.11-cpan-39bf76dae61 )