There is no 'body' generator, only 'form' or 'json'.
https://metacpan.org/pod/Mojo::UserAgent::Transactor#GENERATORS

Since you said $newjson is a hashref, you probably wanted the json
generator.

On Fri, Jul 15, 2016 at 12:54 PM, Todd <[email protected]> wrote:

> Just upgraded Mojolicious to latest via cpanm
> Mojolicious-6.66 (upgraded from 6.38)
>
> This line in my program worked before the upgrade:
>
> $tx     = $ua->$verb($url => {Accept => '*/*'} => body => $newjson);
>
> where in this case $verb is a post, and $newjson is a valid hash ref of
> data.
>
> Now I get the following error message when I execute the line above:
>
> Can't locate object method "" via package "Mojo::UserAgent::Transactor" at
> /usr/local/share/perl/5.18.2/Mojo/UserAgent/Transactor.pm line 118.
>
> Looking at the docs, it doesn't appear the calling syntax has changed.
> Looking at Transactor.pm we have:
>
> 116: if (@_ > 1) {
> 117:   my $cb = $self->generators->{shift()};
> 118:     $self->$cb($tx, @_);
> 119:  }
>
> Any ideas why this is blowing up?  Let me know if you need additional
> information.
>
> Todd
>
> --
> 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 https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to