use strict;
use warnings;
use utf8;
use HTML::Entities qw{encode_entities};
use HTTP::Tiny;
use JSON;
use POSIX qw{:locale_h};
use URI::Escape qw{uri_escape_utf8};
#
# The “my” keyword is on a
_options_ => shift,
_base_ => 'https://translate.yandex.net/api/v1.5/tr.json',
_post_ => undef,
_http_ => HTTP::Tiny->new
};
$self->{_text_} = u
sponse->{content}) {
my $json_respond = JSON->new->utf8->decode($response->{content});
return (wantarray) ? @{ $json_respond->{dirs} } : scalar(@{ $json_respond->{dirs} });
}
}
su