On Sat, May 31, 2014 at 7:17 AM, sri <[email protected]> wrote:

> Just for the curious, what was tge reason for the wantarray cleanup (sorry
>> if thats a little OT)?
>>
>
> Methods that work differently in list context than in scalar context are
> at best a source for bugs, and, at worst an attack vector. So we would like
> to get rid of all of them.
>
>
>> Shouldn't there be accessors for code and message. This currently looks a
>> little messy, compared to the rest of the code mostly provides accessors
>> for impotant attributes.
>>
>
> The error structure is dynamic, there are more fields now, such as a
> response code the message parser recommends for the specific error.
>

Thanks for talking about this, Sebastian.  As usual, I'll follow your lead
and advice in my projects and stop offering context-differing methods.

Along the same lines as Roland for a question, why do you have the method
return a hash instead of an object?

my $err = $tx->error;
die "$err->{code} response: $err->{message}" if $err->{code};


vs


my $err = $tx->error;
die $err->code." response: ".$err->message if $err->code;

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to