Branch Coverage

blib/lib/Net/API/Telegram.pm
Criterion Covered Total %
branch 0 992 0.0


line true false branch
90 0 0 if scalar(@_) % 2
127 0 0 if ($self->{'conf_file'})
130 0 0 unless $self->{'token'}
132 0 0 if $self->{'debug_log_file'}
133 0 0 if $self->{'port'}
147 0 0 unless $self->{'token'}
154 0 0 if $self->{'authorised_ips'} and ref $self->{'authorised_ips'} eq 'ARRAY'
156 0 0 if $self->{'webhook'}
173 0 0 if $cookie_file
182 0 0 if ref $self->{'_auth_ips'} ne 'ARRAY'
184 0 0 if (@_)
191 0 0 if (&Scalar::Util::blessed($raw) and $raw->isa('Net::IP')) { }
210 0 0 if ($ip->overlaps($existing_ip) == $Net::IP::IP_IDENTICAL)
220 0 0 if (ref $this eq 'ARRAY') { }
0 0 elsif (not ref $this) { }
224 0 0 if (my $new_ip = &$check($raw))
233 0 0 if (my $new_ip = &$check($this))
244 0 0 if (scalar @$err)
260 0 0 $$ == $self->{'pid'} ? :
269 0 0 if ($@ =~ /timeout/i)
279 0 0 if (@_)
282 0 0 if (not -e $file) { }
0 0 elsif (-z $file) { }
301 0 0 if ($TryCatch::Error)
315 0 0 unless length $data
316 0 0 if ($unescape)
328 0 0 if ($TryCatch::Error)
336 0 0 unless $io->print($data)
347 0 0 if (@_)
350 0 0 if -e $file and not -w $file
372 0 0 if (@_)
374 0 0 if (scalar @_ == 1) { }
0 0 elsif (scalar(@_) % 2) { }
377 0 0 unless 'Net::API::Telegram::Update'->can($name)
389 0 0 if ref $args->{$name} ne 'CODE'
409 0 0 if length $self->{'host'}
413 0 0 if ($self->{'use_ssl'}) { }
416 0 0 unless $self->{'ssl_key'}
417 0 0 unless $self->{'ssl_cert'}
418 0 0 unless -e $self->{'ssl_key'}
419 0 0 unless -e $self->{'ssl_cert'}
420 0 0 unless -e $self->{'ssl_key'}
421 0 0 unless -e $self->{'ssl_cert'}
438 0 0 if ($_[0] =~ /^\d{1,2}$/)
440 0 0 if ($_[0] < $self->{'debug'}) { }
459 0 0 if (&Scalar::Util::blessed($msg[0]) and $msg[0]->isa('Net::API::Telegram::Message')) { }
466 0 0 if ($self->{'logging'} and $self->{'log_file'} || $self->{'_log_io'})
469 0 0 if ($self->{'_log_io'}) { }
478 0 0 unless $log_io->printf("${stamp}: %s\n", $msg->text)
480 0 0 if $msg->chat->title
494 0 0 if (@_)
497 0 0 unless ($v =~ /^(?:443|80|88|8443)$/)
510 0 0 if ref $opts ne 'HASH'
512 0 0 if ($opts->{'uri'}) { }
0 0 elsif ($opts->{'method'}) { }
520 0 0 if (not $opts->{'headers'}) { }
528 0 0 if length $opts->{'data'}
530 0 0 if ($data->{'certificate'}) { }
0 0 elsif (not $opts->{'request'}) { }
535 0 0 if (&Scalar::Util::blessed($data->{'certificate'})) { }
0 0 elsif (-f $data->{'certificate'}) { }
538 0 0 unless $obj->isa('Net::API::Telegram::InputFile')
556 0 0 if ($self->{'encode_with_json'}) { }
578 0 0 unless (length $req->header('Content-Type'))
580 0 0 if ($opts->{'encode_with_json'} or $self->encode_with_json) { }
598 0 0 if ($resp->is_success) { }
608 0 0 if ($resp->header('Content_Type') =~ m[text/html]) { }
628 0 0 if ($TryCatch::Error)
630 0 0 $resp ? :
653 0 0 if (my $start = $CHILDREN->{$waitedpid}) { }
658 0 0 $? ? :
662 0 0 $? ? :
699 0 0 if (&Scalar::Util::blessed($self->{'skip_past_messages'})) { }
0 0 elsif ($self->{'skip_past_messages'} < 0) { }
722 0 0 if ($self->{'webhook'}) { }
725 0 0 unless $httpd
728 0 0 if $self->{'use_ssl'} or $self->{'external_ssl'}
730 0 0 if ($self->{'external_host'})
734 0 0 if ($self->{'external_port'}) { }
0 0 elsif ($self->port) { }
743 0 0 $self->{'external_path'} ? :
753 0 0 if ($self->{'use_ssl'} and $self->{'ssl_cert'})
758 0 0 unless $self->setWebhook($params)
782 0 0 if (not defined($pid = fork)) { }
0 0 elsif ($pid) { }
803 0 0 if $log_io
823 0 0 if ($req->header('X-Forwarded-For')) { }
833 0 0 unless ($ip_check)
838 0 0 if (scalar @$ok_ips)
841 0 0 if ($remote_addr->overlaps($loopback) == $Net::IP::IP_IDENTICAL) { }
850 0 0 unless ($remote_addr->overlaps($block) == $Net::IP::IP_NO_OVERLAP)
860 0 0 if ($uri->path ne $self->{'webhook_path'})
882 0 0 if (length $info->last_error_message)
887 0 0 if $upd->message
888 0 0 if (not $self->{'skip_past_messages'} or $check_messages_after and $msg_epoch and $msg_epoch > $check_messages_after or $msg_epoch and $msg_epoch > $start) { }
898 0 0 unless exists $handlers->{$k}
901 0 0 if ref $code ne 'CODE'
923 0 0 if ($@ =~ /timeout/i) { }
0 0 elsif ($@) { }
963 0 0 if $self->{'_stop_polling'}
982 0 0 if $upd->message
984 0 0 if (not $self->{'skip_past_messages'} or $check_messages_after and $msg_epoch and $msg_epoch > $check_messages_after or $msg_epoch and $msg_epoch > $start)
994 0 0 unless exists $handlers->{$k}
997 0 0 if ref $code ne 'CODE'
1017 0 0 if ($@ =~ /timeout/i) { }
0 0 elsif ($@) { }
1043 0 0 if ($self->{'webhook'}) { }
1048 0 0 unless kill 9, $kid
1050 0 0 unless $self->deleteWebhook
1065 0 0 if (@_)
1068 0 0 if defined $v and not $v =~ /^\d+$/
1069 0 0 unless defined $v
1080 0 0 if (@_)
1084 0 0 if ($v) { }
1087 0 0 unless $self->{'httpd'}
1104 0 0 unless exists $opts->{'callback_query_id'}
1110 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1124 0 0 unless exists $opts->{'inline_query_id'}
1125 0 0 unless exists $opts->{'results'}
1126 0 0 if ref $opts->{'results'} ne 'ARRAY'
1127 0 0 unless $self->_param_check_array_object(qr/^(?:Net::API::Telegram::InlineQueryResult)$/, @_)
1128 0 0 unless $self->_load(['Net::API::Telegram::InlineQueryResult'])
1134 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1148 0 0 unless exists $opts->{'ok'}
1149 0 0 unless exists $opts->{'pre_checkout_query_id'}
1155 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1169 0 0 unless exists $opts->{'ok'}
1170 0 0 if length $opts->{'shipping_options'} and ref $opts->{'shipping_options'} ne 'ARRAY'
1171 0 0 if length $opts->{'shipping_options'} and not $self->_param_check_array_object(qr/^(?:Net::API::Telegram::ShippingOption)$/, @_)
1172 0 0 unless exists $opts->{'shipping_query_id'}
1173 0 0 unless $self->_load(['Net::API::Telegram::ShippingOption'])
1179 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1193 0 0 unless exists $opts->{'emojis'}
1194 0 0 if length $opts->{'mask_position'} and ref $opts->{'mask_position'} ne 'Net::API::Telegram::MaskPosition'
1195 0 0 unless exists $opts->{'name'}
1196 0 0 unless exists $opts->{'png_sticker'}
1197 0 0 unless ref($opts->{'png_sticker'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1198 0 0 unless exists $opts->{'title'}
1199 0 0 unless exists $opts->{'user_id'}
1200 0 0 unless $self->_load(['Net::API::Telegram::MaskPosition', 'Net::API::Telegram::InputFile'])
1206 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1220 0 0 unless exists $opts->{'chat_id'}
1221 0 0 unless length $opts->{'chat_id'}
1227 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1241 0 0 unless exists $opts->{'chat_id'}
1242 0 0 unless length $opts->{'chat_id'}
1248 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1262 0 0 unless exists $opts->{'chat_id'}
1263 0 0 unless length $opts->{'chat_id'}
1264 0 0 unless exists $opts->{'message_id'}
1270 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1284 0 0 unless exists $opts->{'sticker'}
1290 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1309 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1323 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1324 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
1330 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1350 0 0 unless exists $opts->{'latitude'}
1351 0 0 unless exists $opts->{'longitude'}
1352 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1353 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
1359 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1379 0 0 unless exists $opts->{'media'}
1380 0 0 if ref $opts->{'media'} ne 'Net::API::Telegram::InputMedia'
1381 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1382 0 0 unless $self->_load(['Net::API::Telegram::InputMedia', 'Net::API::Telegram::InlineKeyboardMarkup'])
1388 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1408 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1409 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
1415 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1435 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1436 0 0 unless exists $opts->{'text'}
1437 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
1443 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1463 0 0 unless exists $opts->{'chat_id'}
1464 0 0 unless length $opts->{'chat_id'}
1470 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1484 0 0 unless exists $opts->{'chat_id'}
1485 0 0 unless length $opts->{'chat_id'}
1486 0 0 unless exists $opts->{'from_chat_id'}
1487 0 0 unless length $opts->{'from_chat_id'}
1488 0 0 unless exists $opts->{'message_id'}
1494 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1510 0 0 unless exists $opts->{'chat_id'}
1511 0 0 unless length $opts->{'chat_id'}
1517 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1533 0 0 unless exists $opts->{'chat_id'}
1534 0 0 unless length $opts->{'chat_id'}
1540 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1561 0 0 unless exists $opts->{'chat_id'}
1562 0 0 unless length $opts->{'chat_id'}
1563 0 0 unless exists $opts->{'user_id'}
1569 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1585 0 0 unless exists $opts->{'chat_id'}
1586 0 0 unless length $opts->{'chat_id'}
1592 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1606 0 0 unless exists $opts->{'file_id'}
1612 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1628 0 0 unless exists $opts->{'user_id'}
1634 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1660 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1676 0 0 unless exists $opts->{'name'}
1682 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1698 0 0 if length $opts->{'allowed_updates'} and ref $opts->{'allowed_updates'} ne 'ARRAY'
1704 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1725 0 0 unless exists $opts->{'user_id'}
1731 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1752 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1768 0 0 unless exists $opts->{'chat_id'}
1769 0 0 unless length $opts->{'chat_id'}
1770 0 0 unless exists $opts->{'user_id'}
1776 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1790 0 0 unless exists $opts->{'chat_id'}
1791 0 0 unless length $opts->{'chat_id'}
1797 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1811 0 0 unless exists $opts->{'chat_id'}
1812 0 0 unless length $opts->{'chat_id'}
1813 0 0 unless exists $opts->{'message_id'}
1819 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1833 0 0 unless exists $opts->{'chat_id'}
1834 0 0 unless length $opts->{'chat_id'}
1835 0 0 unless exists $opts->{'user_id'}
1841 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1855 0 0 unless exists $opts->{'chat_id'}
1856 0 0 unless length $opts->{'chat_id'}
1857 0 0 unless exists $opts->{'permissions'}
1858 0 0 if ref $opts->{'permissions'} ne 'Net::API::Telegram::ChatPermissions'
1859 0 0 unless exists $opts->{'user_id'}
1860 0 0 unless $self->_load(['Net::API::Telegram::ChatPermissions'])
1866 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1880 0 0 unless exists $opts->{'animation'}
1881 0 0 unless ref($opts->{'animation'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1882 0 0 unless exists $opts->{'chat_id'}
1883 0 0 unless length $opts->{'chat_id'}
1884 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
1885 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1886 0 0 unless $self->_load(['Net::API::Telegram::InputFile', 'Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply', 'Net::API::Telegram::InputFile'])
1892 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1908 0 0 unless exists $opts->{'audio'}
1909 0 0 unless ref($opts->{'audio'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1910 0 0 unless exists $opts->{'chat_id'}
1911 0 0 unless length $opts->{'chat_id'}
1912 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
1913 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1914 0 0 unless $self->_load(['Net::API::Telegram::InputFile', 'Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply', 'Net::API::Telegram::InputFile'])
1920 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1936 0 0 unless exists $opts->{'action'}
1937 0 0 unless exists $opts->{'chat_id'}
1938 0 0 unless length $opts->{'chat_id'}
1944 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1958 0 0 unless exists $opts->{'chat_id'}
1959 0 0 unless length $opts->{'chat_id'}
1960 0 0 unless exists $opts->{'first_name'}
1961 0 0 unless exists $opts->{'phone_number'}
1962 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
1963 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
1969 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1985 0 0 unless exists $opts->{'chat_id'}
1986 0 0 unless length $opts->{'chat_id'}
1987 0 0 unless exists $opts->{'document'}
1988 0 0 unless ref($opts->{'document'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1989 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
1990 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1991 0 0 unless $self->_load(['Net::API::Telegram::InputFile', 'Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply', 'Net::API::Telegram::InputFile'])
1997 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2013 0 0 unless exists $opts->{'chat_id'}
2014 0 0 unless exists $opts->{'game_short_name'}
2015 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
2016 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
2022 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2038 0 0 unless exists $opts->{'chat_id'}
2039 0 0 unless exists $opts->{'currency'}
2040 0 0 unless exists $opts->{'description'}
2041 0 0 unless exists $opts->{'payload'}
2042 0 0 unless exists $opts->{'prices'}
2043 0 0 if ref $opts->{'prices'} ne 'ARRAY'
2044 0 0 unless $self->_param_check_array_object(qr/^(?:Net::API::Telegram::LabeledPrice)$/, @_)
2045 0 0 unless exists $opts->{'provider_token'}
2046 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
2047 0 0 unless exists $opts->{'start_parameter'}
2048 0 0 unless exists $opts->{'title'}
2049 0 0 unless $self->_load(['Net::API::Telegram::LabeledPrice', 'Net::API::Telegram::InlineKeyboardMarkup'])
2055 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2071 0 0 unless exists $opts->{'chat_id'}
2072 0 0 unless length $opts->{'chat_id'}
2073 0 0 unless exists $opts->{'latitude'}
2074 0 0 unless exists $opts->{'longitude'}
2075 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
2076 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
2082 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2098 0 0 unless exists $opts->{'chat_id'}
2099 0 0 unless length $opts->{'chat_id'}
2100 0 0 unless exists $opts->{'media'}
2101 0 0 if ref $opts->{'media'} ne 'ARRAY'
2102 0 0 unless $self->_param_check_array_object(qr/^(?:Net::API::Telegram::InputMediaPhoto|Net::API::Telegram::InputMediaVideo)$/, @_)
2103 0 0 unless $self->_load(['Net::API::Telegram::InputMediaPhoto', 'Net::API::Telegram::InputMediaVideo'])
2109 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2130 0 0 unless exists $opts->{'chat_id'}
2131 0 0 unless length $opts->{'chat_id'}
2132 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
2133 0 0 unless exists $opts->{'text'}
2134 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
2140 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2156 0 0 unless exists $opts->{'chat_id'}
2157 0 0 unless length $opts->{'chat_id'}
2158 0 0 unless exists $opts->{'photo'}
2159 0 0 unless ref($opts->{'photo'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2160 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
2161 0 0 unless $self->_load(['Net::API::Telegram::InputFile', 'Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
2167 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2183 0 0 unless exists $opts->{'chat_id'}
2184 0 0 unless length $opts->{'chat_id'}
2185 0 0 unless exists $opts->{'options'}
2186 0 0 if ref $opts->{'options'} ne 'ARRAY'
2187 0 0 unless exists $opts->{'question'}
2188 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
2189 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
2195 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2211 0 0 unless exists $opts->{'chat_id'}
2212 0 0 unless length $opts->{'chat_id'}
2213 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
2214 0 0 unless exists $opts->{'sticker'}
2215 0 0 unless ref($opts->{'sticker'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2216 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply', 'Net::API::Telegram::InputFile'])
2222 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2238 0 0 unless exists $opts->{'address'}
2239 0 0 unless exists $opts->{'chat_id'}
2240 0 0 unless length $opts->{'chat_id'}
2241 0 0 unless exists $opts->{'latitude'}
2242 0 0 unless exists $opts->{'longitude'}
2243 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
2244 0 0 unless exists $opts->{'title'}
2245 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
2251 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2267 0 0 unless exists $opts->{'chat_id'}
2268 0 0 unless length $opts->{'chat_id'}
2269 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
2270 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2271 0 0 unless exists $opts->{'video'}
2272 0 0 unless ref($opts->{'video'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2273 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply', 'Net::API::Telegram::InputFile', 'Net::API::Telegram::InputFile'])
2279 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2295 0 0 unless exists $opts->{'chat_id'}
2296 0 0 unless length $opts->{'chat_id'}
2297 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
2298 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2299 0 0 unless exists $opts->{'video_note'}
2300 0 0 unless ref($opts->{'video_note'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2301 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply', 'Net::API::Telegram::InputFile', 'Net::API::Telegram::InputFile'])
2307 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2323 0 0 unless exists $opts->{'chat_id'}
2324 0 0 unless length $opts->{'chat_id'}
2325 0 0 if length $opts->{'reply_markup'} and not ref($opts->{'reply_markup'}) =~ /^(?:Net::API::Telegram::InlineKeyboardMarkup|Net::API::Telegram::ReplyKeyboardMarkup|Net::API::Telegram::ReplyKeyboardRemove|Net::API::Telegram::ForceReply)$/
2326 0 0 unless exists $opts->{'voice'}
2327 0 0 unless ref($opts->{'voice'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2328 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply', 'Net::API::Telegram::InputFile'])
2334 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2350 0 0 unless exists $opts->{'chat_id'}
2351 0 0 unless length $opts->{'chat_id'}
2357 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2371 0 0 unless exists $opts->{'chat_id'}
2372 0 0 unless length $opts->{'chat_id'}
2373 0 0 unless exists $opts->{'permissions'}
2374 0 0 if ref $opts->{'permissions'} ne 'Net::API::Telegram::ChatPermissions'
2375 0 0 unless $self->_load(['Net::API::Telegram::ChatPermissions'])
2381 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2395 0 0 unless exists $opts->{'chat_id'}
2396 0 0 unless length $opts->{'chat_id'}
2397 0 0 unless exists $opts->{'photo'}
2398 0 0 if ref $opts->{'photo'} ne 'Net::API::Telegram::InputFile'
2399 0 0 unless $self->_load(['Net::API::Telegram::InputFile'])
2405 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2419 0 0 unless exists $opts->{'chat_id'}
2420 0 0 unless length $opts->{'chat_id'}
2421 0 0 unless exists $opts->{'sticker_set_name'}
2427 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2441 0 0 unless exists $opts->{'chat_id'}
2442 0 0 unless length $opts->{'chat_id'}
2443 0 0 unless exists $opts->{'title'}
2449 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2463 0 0 unless exists $opts->{'score'}
2464 0 0 unless exists $opts->{'user_id'}
2470 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2490 0 0 unless exists $opts->{'errors'}
2491 0 0 if ref $opts->{'errors'} ne 'ARRAY'
2492 0 0 unless $self->_param_check_array_object(qr/^(?:Net::API::Telegram::PassportElementError)$/, @_)
2493 0 0 unless exists $opts->{'user_id'}
2494 0 0 unless $self->_load(['Net::API::Telegram::PassportElementError'])
2500 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2514 0 0 if $opts->{'certificate'} and $self->{'ssl_cert'}
2515 0 0 if length $opts->{'allowed_updates'} and ref $opts->{'allowed_updates'} ne 'ARRAY'
2516 0 0 if length $opts->{'certificate'} and ref $opts->{'certificate'} ne 'Net::API::Telegram::InputFile'
2517 0 0 unless exists $opts->{'url'}
2518 0 0 unless $self->_load(['Net::API::Telegram::InputFile'])
2524 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2538 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
2539 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
2545 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2565 0 0 unless exists $opts->{'chat_id'}
2566 0 0 unless length $opts->{'chat_id'}
2567 0 0 unless exists $opts->{'message_id'}
2568 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
2569 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
2575 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2591 0 0 unless exists $opts->{'chat_id'}
2592 0 0 unless length $opts->{'chat_id'}
2593 0 0 unless exists $opts->{'user_id'}
2599 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2613 0 0 unless exists $opts->{'chat_id'}
2614 0 0 unless length $opts->{'chat_id'}
2620 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2634 0 0 unless exists $opts->{'png_sticker'}
2635 0 0 if ref $opts->{'png_sticker'} ne 'Net::API::Telegram::InputFile'
2636 0 0 unless exists $opts->{'user_id'}
2637 0 0 unless $self->_load(['Net::API::Telegram::InputFile'])
2643 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2662 0 0 if ($self->{'_encode_with_json'})
2672 0 0 if ($pkg and $pkg =~ /^AI::Net::Stripe/ and exists $value->{'id'})
2679 0 0 if ($ref eq 'HASH') { }
0 0 elsif ($ref eq 'ARRAY') { }
2685 0 0 if ref $sv or not length $sv
2694 0 0 if ref $sv
2701 0 0 $value ? :
0 0 ref $value eq 'JSON::PP::Boolean' ? :
2719 0 0 unless exists $hash->{'ok'}
2720 0 0 if $hash->{'ok'}
2726 0 0 if (exists $hash->{'parameters'} and ref $hash->{'parameters'} eq 'HASH')
2728 0 0 if ($hash->{'parameters'}{'retry_after'})
2730 0 0 if length $desc
2743 0 0 if exists $self->{$name} and &Scalar::Util::blessed($self->{$name})
2757 0 0 if ref $arr ne 'ARRAY'
2762 0 0 if $@
2771 0 0 unless -e $fpath
2772 0 0 unless -r $fpath
2773 0 0 if -s $fpath > 52428800
2783 0 0 unless (exists $args->{'file'} and exists $args->{'line'})
2800 0 0 if ref $opts ne 'HASH'
2807 0 0 if (&Scalar::Util::blessed($this)) { }
0 0 elsif (ref $this eq 'HASH') { }
0 0 elsif (ref $this eq 'ARRAY') { }
2809 0 0 if ref($this) =~ /Net::API::Telegram::/ and $this->can('debug')
2811 0 0 if ($this->can('as_hash')) { }
0 0 elsif (overload::Overloaded($this)) { }
0 0 elsif ($this->can('as_string')) { }
2835 0 0 if (exists $this->{$opt_anti_loop})
2854 0 0 if length $res
2869 0 0 if (length $opts->{$k})
2882 0 0 if (scalar @_)
2884 0 0 if (ref $_[0] eq 'HASH') { }
0 0 elsif (not scalar(@_) % 2) { }
2905 0 0 if ref $patt ne 'Regexp'
2906 0 0 if ref $arr ne 'ARRAY'
2909 0 0 unless ref($o) =~ /$patt/
2919 0 0 if $hash and ref $hash ne 'HASH'
2921 0 0 unless $self->_load([$class])
2928 0 0 if ($TryCatch::Error)
2940 0 0 if $arr and ref $arr ne 'ARRAY'
2942 0 0 unless $self->_load([$class])
2946 0 0 if (ref $ref eq 'HASH') { }
2954 0 0 if ($TryCatch::Error)