Branch: refs/heads/fix/sync-cpan-deps
  Home:   https://github.com/Perl/perl5
  Commit: 7a943e33e15f73370752df757f82dffbb0416f15
      
https://github.com/Perl/perl5/commit/7a943e33e15f73370752df757f82dffbb0416f15
  Author: Sawyer X <[email protected]>
  Date:   2020-09-26 (Sat, 26 Sep 2020)

  Changed paths:
    M Porting/sync-with-cpan

  Log Message:
  -----------
  GH #18109: Detect failures with HTTP::Tiny in sync-with-cpan:

The original code uses HTTP::Tiny and if it fails, we try alternatives.

This isn't the best strategy because it might fail for legitimate
reasons and we need to separate whether it failed for a reason that
other user agents will fail or if it failed without crashing.

But, meh. We try to detect whether it succeeded in the function call
(as in, didn't crash) but failed in the request itself, and then we
surface it.

I've enabled an unavailable proxy configuration and tested it. This
is what it looks like:

    $ perl Porting/sync-with-cpan CPAN
    Cannot retrieve file: http://www.cpan.org/modules/02packages.details.txt
    Status: 599
    Reason: Internal Exception
    Content: Could not connect to 'proxy.xxx.yyy.com:8080': No address 
associated with hostname

Removing the proxy configuration, it succeeded.

Reply via email to