[EMAIL PROTECTED] wrote: >>>Isn't "return;" the more canonical way of returning false ? >> >>Beats me... I know a lot of the mp2 code particular Apache2::Status as I > > > was just digging in there uses return 0. I really have no preference. > > Just a note, the new "Perl Best Practices" Damian Conway, suggest a bare > return is best. In particular > return undef; > is a bad idea as it'll slip an undef into list context (so for zero too?) > which, he shows, can be problematic.
right - bare return() understands its context and will dtrt when the calling function expects a list or a scalar, provided you mean to return simply "false"... is "false" what we're after here, or an actual 0 value. false might run into warnings issues if we try to compare the result in numeric comparisons, while 0 will not... --Geoff --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
