perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: Question about Modperl::Util::exit
Date Mon, 24 Nov 2008 19:52:20 GMT
Perrin Harkins wrote:
> On Thu, Nov 20, 2008 at 4:50 PM, Bruce Johnson
> <johnson@pharmacy.arizona.edu> wrote:
>> This happens when the exit is triggered in the nested require file. which is
>> code like this:
>>
>> # Check to see if the person was logged in, and if not go to login page and
>> # pass the url and parameters
>> if (!defined($UUAff) || !defined($UUPID)) {
>>   $url = "$path/login.pl?prev_url=$prev_url$llist";
>>   print "Location: $url\n\n";
>>   exit;
>> }
>> 1;
> 
> Just replace exit with the appropriate return code.
> 
>   use Apache2::Const -compile => qw(REDIRECT);
>   return Apache2::Const::REDIRECT;
> 
> - Perrin
> 

Can you do a "return" from a "require"-d file, and what does it do exactly ?

Mime
View raw message