Well, this one isn't actually something that changes control flow. It's more of an object with rich behaviour that a method can hand back to its caller, who can work with it in more ways than your usual return value.
It is, like most things these days, intended to be a base class that an author can subclass to get specialized extra behaviour for an application-specific return value object. Would Class::ReturnValue make sense? -j On Wed, Jan 30, 2002 at 11:12:01AM +0000, Tim Bunce wrote: > On Tue, Jan 29, 2002 at 09:09:11PM -0800, William R Ward wrote: > > [EMAIL PROTECTED] (Perl Authors Upload Server) writes: > > > modid: Return::Value > > > Return::Value is an object which encapsulates most of the standard > > > behaviors for function/method return values. It allows a function to > > > return an object that is treated as a boolean in boolean context, as > > > an array in array context and as a rich object if the caller wants > > > to use advanced features such as stack traces or lists of warnings > > > or complex return datatypes. > > > > I don't think that a "Return" top-level namespace is a very good > > choice for this.. How about (something)::ReturnValue, for some > > reasonable value of (something)? > > Umm, in the 'control flow' section of the module list we currently have > > * AtExit - atexit() function to register exit-callbacks > * Callback - Define easy to use function callback objects > * Hook::PrePostCall - Add actions before and after a routine > * Memoize - Cache results of individual function calls > * Religion - Control where you go when you die()/warn() > > It's kind'a tempting to propose a ControlFlow:: category. > Most/all of the above would have fitted in there nicely > (usually a sign of a good name). > > So how about ControlFlow::ReturnValue ? > > Tim. > -- jesse reed vincent -- [EMAIL PROTECTED] -- [EMAIL PROTECTED] 70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90 <lamont> I'm reasonably sure that at least two of the electric blue kangeroos I saw were real.