Shawn.The test suite for IO::Async::Loop::Glib hangs on my machine when I try to install it (also Strawberry Perl 5.24.1 x64).Did the tests pass on your machine when installing?
There is already a ticket open for it. https://rt.cpan.org/Public/Bug/Display.html?id=116582 On 27 February 2017 at 12:51, haratron <haratron gmail com> wrote:Can anyone try this code and post if there's any output? I don't get any output. I suspect something is wrong on the lib level.I'm on Windows 10 with Strawberry Perl 5.24 64bit btw.======#!/usr/bin/perluse strict;use warnings;use IO::Async::Loop::Glib;use Net::Async::HTTP;use Gtk2 qw( -init );my $loop = IO::Async::Loop::Glib->new;my $ua = Net::Async::HTTP->new;$loop->add( $ua );recognition();Gtk2->main;sub recognition{my $f = $ua->POST([test => "params",go => "here",])->then(# successsub {my ( $response ) = @_;print "response is: $response\n";Future->done;},# failuresub {my ( $error ) = @_;print "failure is $error\n";Future->done;},);$ua->adopt_future( $f );}On Mon, Feb 27, 2017 at 12:04 AM, Grant McLean <grant mclean net nz> wrote:You might want to look at libsoup - the Gnome library for HTTP requests.
I think the latest Perl bindings are here:
https://metacpan.org/release/HTTP-Soup-Gnome
Regards
Grant
> ______________________________
On Sun, 2017-02-26 at 23:41 +0200, haratron wrote:
> I'm trying to do a non blocking call to an http server with
> Mojo::UserAgent so that it doesn't block the Gtk GUI while it's
> waiting for the response. I want to do the request and once the
> results are back to update the GUI. I'm confused on how to do this.
> I'm on win32, here's the code so far.
>
>
> http://pastebin.ca/3772676
>
>
> This code makes the program hang and they told me on #perl that it's
> because I'm using two loops, one from Gtk and one from Mojo.
> What is the correct way of doing this?
>
>
_________________
> gtk-perl-list mailing list
> gtk-perl-list gnome org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list