TAILIEUCHUNG - Embedding Perl in HTML with Mason Chapter 4: APIs- P2

Tham khảo tài liệu 'embedding perl in html with mason chapter 4: apis- p2', 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 4 APIs- P2 Subrequests Subrequests are request objects that inherit all their settable properties from their parent. The main difference between calling a component with a subrequest versus using a regular component call is that subrequests will invoke the autohandler and dhandler mechanisms whereas a regular component call will execute only the called component. Subrequests are covered in a more detail in Chapter 5. make_subrequest comp component args . . This method creates a new subrequest object which you can then execute via its exec method. This gives you a chance to override the parent object s properties by passing in arguments to this method. subexec comp args This combines the make_subrequest method and the subrequest s exec method in one step. Any argument list given to subexec will become the argument list for the called component. This doesn t give you a chance to set properties of the request however. For that you ll need to use the full two-step approach of calling make_subrequest and then exec on the returned object. is_subrequest This method returns a boolean value indicating whether the given object is a subrequest. parent_request Calling this method returns the parent request object for a subrequest. If called on the top-level request object it just returns undef. Methods Available Only When Using ApacheHandler When you are using Mason under mod_perl with the HTML Mason ApacheHandler class which is covered in Chapter 7 the Request object will contain several additional methods. ah This method returns the current HTML Mason ApacheHandler object for this request. apache_req This method returns the current Apache object for the request. This object is also available in all components as the variable r. If you chose to use Apache Request to handle incoming parameters by setting args_method to mod_perl this object will be an Apache Request object otherwise it will be an Apache object. Incoming parameter handling is covered in Chapter 7. .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.