CGI Application Modules for CPAN
CGI::Application::MailPage was to install them in a Perl module path by specifying 
them as modules using the PM option to WriteMakeFile() in my Makefile.PL:
WriteMakefile(
               NAME  =>  CGI::Application::MailPage ,
               VERSION_FROM  =>  MailPage.pm ,
               PM  => {
                        MailPage.pm  =>  $(INST_LIBDIR)/MailPage.pm ,
                        email.tmpl   =>  $(INST_LIBDIR)/MailPage/email.tmpl ,
                        form.tmpl    =>  $(INST_LIBDIR)/MailPage/form.tmpl ,
                        thanks.tmpl  =>  $(INST_LIBDIR)/MailPage/thanks.tmpl ,
                      },
               );
Then when loading them, I simply added the contents of @INC to HTML::Template's 
search path for template files (via the path option):
    $template = $self >load_tmpl( CGI/Application/MailPage/form.tmpl ,
                                 path => [@INC]);
Another possibility would have been to include the template text directly 
inside the module file or interactively prompt the user for a template location 
during module installation.
Summary
This chapter has introduced you to a new module, CGI::Application, that can greatly 
improve the way you build CGI programs. CGI::Application also provides an oppor 
tunity, for the first time, to distribute fully functional Web applications through 
CPAN. This could be an area of tremendous growth in the utility of CPAN and you 
now have the tools you need to make a major contribution. See you on PAUSE!
27
271
1






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

web hosting perl

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved