Apache-CIPP

 view release on metacpan or  search on metacpan

CIPP.pm  view on Meta::CPAN

    # debugging infos to error log?
    PerlSetVar	debug		1

    # used databases
    # (comma separated, whitespace is ignored)
    PerlSetVar	databases	"zyn, foo"

    # default database
    PerlSetVar	default_db	zyn

    # configuration for the database named 'zyn'
    # (please refer to the DBI documentation for details)
    PerlSetVar	db_zyn_data_source      dbi:mysql:zyn
    PerlSetVar	db_zyn_user             my_username1
    PerlSetVar	db_zyn_password         my_password1
    PerlSetVar	db_zyn_auto_commit      1

    # configuration for the database named 'foo'
    PerlSetVar	db_foo_data_source      dbi:Oracle:foo
    PerlSetVar	db_foo_user             my_username2
    PerlSetVar	db_foo_password         my_password2
    PerlSetVar	db_foo_auto_commit      0

  </Location>

=head1 DESCRIPTION

This module enables you to use the powerful CIPP HTML
embedding language together with the Apache webserver.
It is based on mod_perl and works as a request handler.
So you can transparently use CIPP pages everywhere
on your webserver.

=head1 WHAT IS CIPP?

CIPP is a Perl module for translating CIPP sources to pure
Perl programs. CIPP defines a HTML embedding language also
called CIPP which has powerful features for CGI and database
developers.

Many standard CGI and database operations (and much more)
are covered by CIPP, so the developer does not need to code
them again and again.

CIPP is not part of this distribution, please download it
from CPAN.

=head1 SIMPLE CIPP EXAMPLE

To give you some imagination of what you can do with CIPP:
here is a (really) simple example of using CIPP in a HTML
source to retrieve some information from a database. Think
this as a HTML page which is "executed" on the fly by
your Apache webserver.
Note: there is no code to connect to the database. This is
done implicitely. The configuration is taken from the Apache
configuration file(s).

  # print table of users who match the given parameter
  
  <?INTERFACE INPUT="$search_name">

  <HTML>
  <HEAD><TITLE>tiny litte CIPP example</TITLE></HEAD>
  <BODY>
  <H1>Users matching '$search_name'</H1>
  <P>

  <TABLE BORDER=1>
  <TR><TD>Name</TD><TD>Adress</TD><TD>Phone</TD></TR>
  <?SQL SQL="select name, adress, phone
             from   people
	     where  name like '%' || ? || '%'"
        PARAMS="$search_name"
	MY VAR="$n, $a, $p">
    <TR><TD>$n</TD><TD>$a</TD><TD>$p</TD></TR>
  <?/SQL>
  </TABLE>

  </BODY>
  </HTML>

=head1 CONFIGURATION

Place the configuration options listed in the SYNOPSIS into
your Apache configuration file(s) (e.g. httpd.conf). The
SYNOPSIS example configures all files with the suffix .cipp to be
handled by Apache::CIPP. Please refer to the Apache documentation
for details about configuring your webserver.

The CIPP PDF documentation contains some more explantation of the
Apache::CIPP configuration parameters. Also CGI::CIPP explains
them briefly. You can download the documentation and CGI::CIPP
from CPAN.

=head1 DOWNLOAD Apache::CIPP

Apache::CIPP and friends can be downloaded from CPAN

  $CPAN/modules/by-authors/id/J/JR/JRED/

=head1 INSTALLING Apache::CIPP

  perl Makefile.PL
  make
  make test
  make install

=head1 AUTHOR

Joern Reder <joern@dimedis.de>

=head1 COPYRIGHT

Copyright 1998-1999 Joern Reder, All Rights Reserved

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=head1 SEE ALSO



( run in 0.701 second using v1.01-cache-2.11-cpan-d7f47b0818f )