CGI-Builder-Magic
view release on metacpan or search on metacpan
CGI-Builder-Magic README File
=============================
Description
-----------
This module transparently integrates C<CGI::Builder> and C<Template::Magic> in a very handy, powerful and flexible framework that can save you a lot of coding, time and resources.
Installation
------------
0. Prerequisites:
- CGI::Builder >= 1.31
- Template::Magic >= 1.36
1. CPAN installation
lib/CGI/Builder/Magic.pm view on Meta::CPAN
# just include it in your build
use CGI::Builder
qw| CGI::Builder::Magic
|;
=head1 DESCRIPTION
B<Note>: You should know L<CGI::Builder>.
This module transparently integrates C<CGI::Builder> and C<Template::Magic> in a very handy, powerful and flexible framework that can save you a lot of coding, time and resources.
With this module, you don't need to produce the C<page_content> within your page handlers anymore (unless you want to); you don't even need to manage a template system yourself (unless you want to).
If you use any template system on your own (i.e. not integrated in a CBF extension), you will have to write all this code explicitly:
=over
=item *
create a page handler for each page as usual
lib/CGI/Builder/Magic.pm view on Meta::CPAN
=item *
find the runtime values and assign them to the template object
=item *
run the template process and set the C<page_content> to the produced output
=back
You can save all that by just including this module in your build, because it implements an internal transparent and automagic template system that even without your explicit intervention is capable of finding the correct template and the correct run...
=head2 How to organize your CBB
Add these steps to the recommendations in L<CGI::Builder/"Design your application">:
=over
=item 1
Prepare a template for each page addressed by your application or prepare a Page Handler for those which will not have a template
lib/CGI/Builder/Magic.pm view on Meta::CPAN
</html>
=head1 SPECIAL INTEGRATIONS
This extension will add some special features to your CBB when some specific extension is included.
=head2 Apache::CGI::Builder (Perl Side Include)
SSI (Server Side Includes) are directives that are placed in HTML pages, and evaluated on the server while the pages are being served. The Apache server uses the C<mod_include> Apache module to process the pages, but you can configure it to process t...
In other words: your own CBB transparently process the pages of a web dir, supplying the dinamic content that will be included in the page just before they are served.
With this technique B<your application does not need to handle neither page names, nor page handlers, nor template managements>: all that is auto-magically handled by the combination of C<Apache::CGI::Builder> and C<CGI::Builder::Magic> extensions.
Please, take a look at the 'perl_side_include' example in this distribution to understand all the advantages offered by this technique.
=head2 CGI::Builder::Session
When you include in your CBB the L<CGI::Builder::Session|CGI::Builder::Session> extension, you will have magically available a label that will be substituted with the current session id. See L<the CGISESSID label|"item_the_CGISESSID_label"> for detai...
=head2 CGI::Builder::DFVCheck
( run in 0.357 second using v1.01-cache-2.11-cpan-a1d94b6210f )