Hi Paul,

Paul Vixie wrote:
> Raymond Wan <r...@kuicr.kyoto-u.ac.jp> writes:
> 
>>> if (not $success) {
>>>   return $m->comp('/BAR', %ARGS);
>>> }
>> I didn't ask the original question, but your answer intrigued me.  How
>> does "return" differ from a "redirect" and which is preferred between the
>> two and why?
> 
> "return" as shown here does nothing to the output that was already sent by
> the components called before this one (for example your preamble/headings),
> and does nothing to prevent the component who called this one from sending


...

Thank you for your explanation!  I never knew about the difference between the 
two.  Actually, I never knew that "return" could take a URL as an argument.  
So, to go to another component or URL, I thought "redirect" was basically the 
only way to do it.  I guess from using other languages, I thought return is 
used alone (i.e., "return;") or with some status code (i.e.,  "return 1;").

I guess I need to think what I've done and see if my redirect's should be 
return's...  Thanks again!

Ray


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to