|
|
Choosing A Webhost: |
runmode return scalar reference ?: msg#00009lang.perl.modules.cgi-appplication
hi, poking through C::A src code and i noticed that one can return a scalar reference as output from a runmode. as indicated by the followying lines from run subroutine. # Support scalar-ref for body return my $bodyref = (ref($body) eq 'SCALAR') ? $body : \$body; .... # Build up total output my $output = $headers.$$bodyref; ..... return $output; C::A doc doesn't mention it and i have never seen ppl doing stuff like sub my_runmode { return \$tt->process(...); } but it seems to be a good thing to do,especially in mod_perl. my question would be.. is this a well-known behaviour? thanks, James. ____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/cgiapp@xxxxxxxxxxxxxxxxx/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: cgiapp-unsubscribe@xxxxxxxxxxxxxxxxx For additional commands, e-mail: cgiapp-help@xxxxxxxxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: CGI::App::Dispatch mod_rewrite, Rob Mills |
|---|---|
| Next by Date: | CAP::Dispatch::Regexp, Rob Mills |
| Previous by Thread: | CGI::App::Dispatch mod_rewrite, Rob Mills |
| Next by Thread: | Re: runmode return scalar reference ?, Michael Peters |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |