http-useragent icon indicating copy to clipboard operation
http-useragent copied to clipboard

HTTP::UserAgent.new(timeout => 10) does not set the timeout but probably should

Open AlexDaniel opened this issue 6 years ago • 1 comments

I was expecting this code to work:

my $ua = HTTP::UserAgent.new(timeout => 10);
say $ua # HTTP::UserAgent.new(timeout => 180, …)

But it doesn't, and it seems like I have to set the timeout with $ua.timeout = 10. Would've been great if it was possible to set the timeout right from the constructor.

AlexDaniel avatar Jun 25 '18 22:06 AlexDaniel

https://github.com/sergot/http-useragent/blob/06a70d5cc8905dd5c5e16f26c8ca8cc1ad85f369/lib/HTTP/UserAgent.pm6#L75

s/submethod BUILD/submethod TWEAK/

ugexe avatar Jun 26 '18 23:06 ugexe