Re: Async HTTP download with Glib event loop doesn't work on windows
- From: Peter Juhasz <peter juhasz83 gmail com>
- To: Brian Manning <cpan xaoc org>
- Cc: GTK-Perl List <gtk-perl-list gnome org>
- Subject: Re: Async HTTP download with Glib event loop doesn't work on windows
- Date: Fri, 10 Mar 2017 16:27:46 +0100
The plot thickens.
I've got a very helpful tip about Berrybrew (
https://github.com/stevieb9/berrybrew ), which is a Windows analog to Perlbrew, allowing multiple versions of Strawberry Perl to coexist on the same system. I've installed Glib (1.305), Gtk2 (1.2498), AnyEvent (7.13), AnyEvent::HTTP (2.23) on all versons between 5.12 and 5.24, and ran the test script on all of them. 5.16.3 and below works, 5.18.4 and above fails.
The following test program demonstrates the issue even more dramatically:
##################
#!/usr/bin/perl
use strict;
use warnings;
use feature qw/say/;
use Gtk2 -init;
use AnyEvent;
use AnyEvent::HTTP;
my $w = Gtk2::Window->new();
my $l = Gtk2::Label->new();
$l->set_text("init");
$w->add($l);
$w->show_all();
my $wa; $wa = AnyEvent->timer(after => 2.0, interval => 2.0, cb => sub {
http_request('GET',
'
http://www.fsz.bme.hu/cgi-bin/ltime',
sub {
my ($response_body, $response_headers) = @_;
$l->set_text($response_body);
}
);
$l->set_text("ready");
});
Gtk2->main();
#######################
On Perl 5.16.3 and below it fetches the data from the network and displays it in a window, on 5.18.4 and above it hangs.
I've looked at the perldelta docs for 5.18 but nothing obvious stood out.
Now what?
Peter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]