[Catalyst] Returning values from forward()
matt.lawrence at ymogen.net
Mon Jun 11 09:53:47 GMT 2007
Michele Beltrame wrote:
> Hello Jim!
>> What is the consensus on returning values from a call to forward?
> I use forward() return values sometimes, they seem to work perfectly! I read
> this is discouraged by some people, I don't know why though...
I think the main reason is that the return value doesn't behave as you
might expect. It's always in list context, regardless of the context in
which the forward() call was made, and any false values are returned as
0, including undef.
More information about the Catalyst