There is a script for checking domains for employment. It uses the Regru :: API module. Works on Windows.

The code in general looks like this:

my $client = Regru::API->new( username => 'login', password => 'pass', ); my %params = ( 'domains' => \@domains ); my $resp = $client->domain->check(%params); if ($resp->is_success) { # Обрабатываем ответ } else { say "Request error: " . $resp->error_text . " (Code: " . $resp->error_code . ")"; } 

When running on the customer's computer, an error appears;

 Error: service failed: cant connect to api.reg.ru:443 Bad address at LWP/Protocol/http.pm line 47, <$wf> line 1. At regru/api/response.pm line 75. Request error: API response error (Code: API_FAIL) 

From the information about the system it is known only that Windows 7 home premium 64bit (in Japanese), the antivirus is disabled, there is no firewall. From the browser request to api.reg.ru passes. The script itself is packaged in exe with the help of the pp utility, all the necessary / dll modules are connected (on a clean system, the performance has been checked).

    1 answer 1

    If you go through the module, it becomes clear that in the end Regru :: API :: Role :: UserAgent is responsible for all requests. And about him it is written:

    Returns an LWP :: UserAgent instance.

    And judging by the error, it is trying to break into the API via HTTPS . Therefore, Wang, that the system simply does not have the LWP :: Protocol :: https module installed. In any case, it is worth starting with checking its availability / correctness of work: without a rerush shell, but in all variants - in pure pearl on the target machine, under pp with DLLs, etc.