TAILIEUCHUNG - Embedding Perl in HTML with Mason Chapter 9: Mason and CGI

Tham khảo tài liệu 'embedding perl in html with mason chapter 9: mason and cgi', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 9 Mason and CGI Although mod_perl is pretty cool it s not the only way to use Mason to build a web site. In fact plenty of times it s more advisable to use CGI than mod_perl as we describe in this chapter. If you find yourself in such a situation you re in luck -- Mason works just fine under CGI and special care has gone into making sure the cooperation is smooth. The HTML Mason CGIHandler module provides the glue necessary to use Mason in most common CGI environments. CGI-Appropriate Situations Before we get into the details of how to set up Mason under CGI let s think about why you might want to use this setup. After all isn t mod_perl supposed to be better than CGI Well yes and no. As in most things context is everything. The following factors may conspire to make you choose clunky old CGI over clunky new mod_perl in a particular situation Need instant gratification Installing mod_perl can be somewhat difficult if you ve never done it before heck even if you have done it before and it can take a while to get used to the peculiarities of developing in a mod_perl environment. If you want to try Mason out but don t want to spend time installing and configuring mod_perl or you don t want to wait for the person who s going to come install it for you you may be interested in using HTML Mason CGIHandler to start development then switching over to mod_perl and HTML Mason ApacheHandler once you ve gotten comfortable with mod_perl. Must share hosting environments Many organizations simply don t have the money to pay for their own server and staff to administer it so they sign up with a cheap virtual hosting service that lets them run CGI scripts. The key word virtual means that several organizations inevitably of varying scruples share the same web server on the same machine. Although some of these services say they offer mod_perl you should not use it because it is very insecure and very prone to catastrophic development errors. It is insecure because all your .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.