CGI-Builder-CgiAppAPI

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

CGI-Builder-CgiAppAPI README File
=================================


Description
-----------

This module supplies an API compatible with the old CGI::Application or CGI::Application::Plus APIs. It transparently provides all the aliases, defaults and method redefinition to make the old cgiapps work unchanged under CBF as well.
    
Installation
------------

0.  Prerequisites:
    - CGI::Builder >= 1.3

1. CPAN installation

    perl -MCPAN -e 'install CGI::Builder::CgiAppAPI'

lib/CGI/Builder/CgiAppAPI.pm  view on Meta::CPAN

   
   # when your migration is completed
   # just get rid of the CGI::Builder::CgiAppAPI
   use CGI::Builder ;
   

=head1 DESCRIPTION

B<Note>: You should know L<CGI::Builder>.

This module supplies an API compatible with the C<CGI::Application> or C<CGI::Application::Plus> APIs. It transparently provides all the aliases, defaults and method redefinition to make the old cgiapps work unchanged under CBF as well. Besides, it p...

B<WARNING>: This module is not intended to be used neither as an alternative API for the CBF nor in a production environment. You should use it only as:

=over

=item *

the glue-code to add new CBF methods and capability to your old cgiapps, thus temporarily running applications implementing mixed APIs

=item *

lib/CGI/Builder/CgiAppAPI.pm  view on Meta::CPAN

The CBF implements a different metaphor based on 'processing pages' instead of 'running applications'. This should be simpler to understand (specially for beginners) because it is more consistent with the specific task that a CGI::Builder application...

Even if the internal implementation of similar methods is greatly improved and has a completely different internal code, from the user point of view most changes here don't require more than a simple translation of identifier from one concept to the ...

The CGI::Application philosophy is very simple: the application defines several run methods, and each run method is organized to produce and return its own output page. You have to set a map in the application to define what run method has to be call...

The CBF let you organize your application in a far more flexible way, it just need to find some C<page_content> to send to the client: it does not matter what method or handler has set it during the process, (and the C<page_content> itself might even...

This flexible structure open several handy and powerful possibilities to your application and to the extension system. If you want to know some more details about that, you could read L<CGI::Application::Plus/"Exclusive Features and Improvements"> wh...

B<Note>: The changes reported below are needed just if you want to completely convert your old cgiapp to the CBF. Until you include this API in your build, they are transparently added to your application.

=head2 mode_param

Change it with C<cgi_page_param>.

C<mode_param> is used to define the query parameter that holds the run mode, and its default is 'rm'. The CGI::Builder property to use is the C<cgi_page_param> and its default is 'p', so if your old cgiapp rely on the default, you should either set e...

    # (simpler) solution 1: put this line in the OH_init()
    $s->cgi_page_param = 'rm';
    



( run in 0.712 second using v1.01-cache-2.11-cpan-a1d94b6210f )