Branch Coverage

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


line true false branch
87 0 0 if scalar(@_) % 2
124 0 0 if ($self->{'conf_file'})
127 0 0 unless $self->{'token'}
129 0 0 if $self->{'debug_log_file'}
130 0 0 if $self->{'port'}
144 0 0 unless $self->{'token'}
151 0 0 if $self->{'authorised_ips'} and ref $self->{'authorised_ips'} eq 'ARRAY'
153 0 0 if $self->{'webhook'}
170 0 0 if $cookie_file
179 0 0 if ref $self->{'_auth_ips'} ne 'ARRAY'
181 0 0 if (@_)
188 0 0 if (&Scalar::Util::blessed($raw) and $raw->isa('Net::IP')) { }
207 0 0 if ($ip->overlaps($existing_ip) == $Net::IP::IP_IDENTICAL)
217 0 0 if (ref $this eq 'ARRAY') { }
0 0 elsif (not ref $this) { }
221 0 0 if (my $new_ip = &$check($raw))
230 0 0 if (my $new_ip = &$check($this))
241 0 0 if (scalar @$err)
257 0 0 $$ == $self->{'pid'} ? :
266 0 0 if ($@ =~ /timeout/i)
276 0 0 if (@_)
279 0 0 if (not -e $file) { }
0 0 elsif (-z $file) { }
297 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 length $@ ? :
0 0 if ($Nice::Try::HAS_CATCH)
0 0 if ($Nice::Try::DIED)
300 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 $Nice::Try::WANTARRAY ? :
0 0 if (defined $Nice::Try::WANTARRAY and not ref $Nice::Try::RETVAL[0] && $Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL'))
312 0 0 unless length $data
313 0 0 if ($unescape)
324 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 length $@ ? :
0 0 if ($Nice::Try::HAS_CATCH)
0 0 if ($Nice::Try::DIED)
333 0 0 unless $io->print($data)
337 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 $Nice::Try::WANTARRAY ? :
0 0 if (defined $Nice::Try::WANTARRAY and not ref $Nice::Try::RETVAL[0] && $Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL'))
344 0 0 if (@_)
347 0 0 if -e $file and not -w $file
369 0 0 if (@_)
371 0 0 if (scalar @_ == 1) { }
0 0 elsif (scalar(@_) % 2) { }
374 0 0 unless 'Net::API::Telegram::Update'->can($name)
386 0 0 if ref $args->{$name} ne 'CODE'
406 0 0 if length $self->{'host'}
410 0 0 if ($self->{'use_ssl'}) { }
413 0 0 unless $self->{'ssl_key'}
414 0 0 unless $self->{'ssl_cert'}
415 0 0 unless -e $self->{'ssl_key'}
416 0 0 unless -e $self->{'ssl_cert'}
417 0 0 unless -e $self->{'ssl_key'}
418 0 0 unless -e $self->{'ssl_cert'}
435 0 0 if ($_[0] =~ /^\d{1,2}$/)
437 0 0 if ($_[0] < $self->{'debug'}) { }
456 0 0 if (&Scalar::Util::blessed($msg[0]) and $msg[0]->isa('Net::API::Telegram::Message')) { }
463 0 0 if ($self->{'logging'} and $self->{'log_file'} || $self->{'_log_io'})
466 0 0 if ($self->{'_log_io'}) { }
475 0 0 unless $log_io->printf("${stamp}: %s\n", $msg->text)
477 0 0 if $msg->chat->title
491 0 0 if (@_)
494 0 0 unless ($v =~ /^(?:443|80|88|8443)$/)
507 0 0 if ref $opts ne 'HASH'
509 0 0 if ($opts->{'uri'}) { }
0 0 elsif ($opts->{'method'}) { }
517 0 0 if (not $opts->{'headers'}) { }
525 0 0 if length $opts->{'data'}
527 0 0 if ($data->{'certificate'}) { }
0 0 elsif (not $opts->{'request'}) { }
532 0 0 if (&Scalar::Util::blessed($data->{'certificate'})) { }
0 0 elsif (-f $data->{'certificate'}) { }
535 0 0 unless $obj->isa('Net::API::Telegram::InputFile')
553 0 0 if ($self->{'encode_with_json'}) { }
575 0 0 unless (length $req->header('Content-Type'))
577 0 0 if ($opts->{'encode_with_json'} or $self->encode_with_json) { }
595 0 0 if ($resp->is_success) { }
605 0 0 if ($resp->header('Content_Type') =~ m[text/html]) { }
624 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 length $@ ? :
0 0 if ($Nice::Try::HAS_CATCH)
0 0 if ($Nice::Try::DIED)
627 0 0 $resp ? :
633 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 $Nice::Try::WANTARRAY ? :
0 0 if (defined $Nice::Try::WANTARRAY and not ref $Nice::Try::RETVAL[0] && $Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL'))
650 0 0 if (my $start = $CHILDREN->{$waitedpid}) { }
655 0 0 $? ? :
659 0 0 $? ? :
696 0 0 if (&Scalar::Util::blessed($self->{'skip_past_messages'})) { }
0 0 elsif ($self->{'skip_past_messages'} < 0) { }
719 0 0 if ($self->{'webhook'}) { }
722 0 0 unless $httpd
725 0 0 if $self->{'use_ssl'} or $self->{'external_ssl'}
727 0 0 if ($self->{'external_host'})
731 0 0 if ($self->{'external_port'}) { }
0 0 elsif ($self->port) { }
740 0 0 $self->{'external_path'} ? :
750 0 0 if ($self->{'use_ssl'} and $self->{'ssl_cert'})
755 0 0 unless $self->setWebhook($params)
779 0 0 if (not defined($pid = fork)) { }
0 0 elsif ($pid) { }
800 0 0 if $log_io
820 0 0 if ($req->header('X-Forwarded-For')) { }
830 0 0 unless ($ip_check)
835 0 0 if (scalar @$ok_ips)
838 0 0 if ($remote_addr->overlaps($loopback) == $Net::IP::IP_IDENTICAL) { }
847 0 0 unless ($remote_addr->overlaps($block) == $Net::IP::IP_NO_OVERLAP)
857 0 0 if ($uri->path ne $self->{'webhook_path'})
879 0 0 if (length $info->last_error_message)
884 0 0 if $upd->message
885 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) { }
895 0 0 unless exists $handlers->{$k}
898 0 0 if ref $code ne 'CODE'
920 0 0 if ($@ =~ /timeout/i) { }
0 0 elsif ($@) { }
960 0 0 if $self->{'_stop_polling'}
979 0 0 if $upd->message
981 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)
991 0 0 unless exists $handlers->{$k}
994 0 0 if ref $code ne 'CODE'
1014 0 0 if ($@ =~ /timeout/i) { }
0 0 elsif ($@) { }
1040 0 0 if ($self->{'webhook'}) { }
1045 0 0 unless kill 9, $kid
1047 0 0 unless $self->deleteWebhook
1062 0 0 if (@_)
1065 0 0 if defined $v and not $v =~ /^\d+$/
1066 0 0 unless defined $v
1077 0 0 if (@_)
1081 0 0 if ($v) { }
1084 0 0 unless $self->{'httpd'}
1101 0 0 unless exists $opts->{'callback_query_id'}
1107 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1121 0 0 unless exists $opts->{'inline_query_id'}
1122 0 0 unless exists $opts->{'results'}
1123 0 0 if ref $opts->{'results'} ne 'ARRAY'
1124 0 0 unless $self->_param_check_array_object(qr/^(?:Net::API::Telegram::InlineQueryResult)$/, @_)
1125 0 0 unless $self->_load(['Net::API::Telegram::InlineQueryResult'])
1131 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1145 0 0 unless exists $opts->{'ok'}
1146 0 0 unless exists $opts->{'pre_checkout_query_id'}
1152 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1166 0 0 unless exists $opts->{'ok'}
1167 0 0 if length $opts->{'shipping_options'} and ref $opts->{'shipping_options'} ne 'ARRAY'
1168 0 0 if length $opts->{'shipping_options'} and not $self->_param_check_array_object(qr/^(?:Net::API::Telegram::ShippingOption)$/, @_)
1169 0 0 unless exists $opts->{'shipping_query_id'}
1170 0 0 unless $self->_load(['Net::API::Telegram::ShippingOption'])
1176 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1190 0 0 unless exists $opts->{'emojis'}
1191 0 0 if length $opts->{'mask_position'} and ref $opts->{'mask_position'} ne 'Net::API::Telegram::MaskPosition'
1192 0 0 unless exists $opts->{'name'}
1193 0 0 unless exists $opts->{'png_sticker'}
1194 0 0 unless ref($opts->{'png_sticker'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1195 0 0 unless exists $opts->{'title'}
1196 0 0 unless exists $opts->{'user_id'}
1197 0 0 unless $self->_load(['Net::API::Telegram::MaskPosition', 'Net::API::Telegram::InputFile'])
1203 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1217 0 0 unless exists $opts->{'chat_id'}
1218 0 0 unless length $opts->{'chat_id'}
1224 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1238 0 0 unless exists $opts->{'chat_id'}
1239 0 0 unless length $opts->{'chat_id'}
1245 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1259 0 0 unless exists $opts->{'chat_id'}
1260 0 0 unless length $opts->{'chat_id'}
1261 0 0 unless exists $opts->{'message_id'}
1267 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1281 0 0 unless exists $opts->{'sticker'}
1287 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1306 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1320 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1321 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
1327 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1347 0 0 unless exists $opts->{'latitude'}
1348 0 0 unless exists $opts->{'longitude'}
1349 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1350 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
1356 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1376 0 0 unless exists $opts->{'media'}
1377 0 0 if ref $opts->{'media'} ne 'Net::API::Telegram::InputMedia'
1378 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1379 0 0 unless $self->_load(['Net::API::Telegram::InputMedia', 'Net::API::Telegram::InlineKeyboardMarkup'])
1385 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1405 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1406 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
1412 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1432 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
1433 0 0 unless exists $opts->{'text'}
1434 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
1440 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1460 0 0 unless exists $opts->{'chat_id'}
1461 0 0 unless length $opts->{'chat_id'}
1467 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1481 0 0 unless exists $opts->{'chat_id'}
1482 0 0 unless length $opts->{'chat_id'}
1483 0 0 unless exists $opts->{'from_chat_id'}
1484 0 0 unless length $opts->{'from_chat_id'}
1485 0 0 unless exists $opts->{'message_id'}
1491 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1507 0 0 unless exists $opts->{'chat_id'}
1508 0 0 unless length $opts->{'chat_id'}
1514 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1530 0 0 unless exists $opts->{'chat_id'}
1531 0 0 unless length $opts->{'chat_id'}
1537 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1558 0 0 unless exists $opts->{'chat_id'}
1559 0 0 unless length $opts->{'chat_id'}
1560 0 0 unless exists $opts->{'user_id'}
1566 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1582 0 0 unless exists $opts->{'chat_id'}
1583 0 0 unless length $opts->{'chat_id'}
1589 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1603 0 0 unless exists $opts->{'file_id'}
1609 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1625 0 0 unless exists $opts->{'user_id'}
1631 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1657 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1673 0 0 unless exists $opts->{'name'}
1679 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1695 0 0 if length $opts->{'allowed_updates'} and ref $opts->{'allowed_updates'} ne 'ARRAY'
1701 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1722 0 0 unless exists $opts->{'user_id'}
1728 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1749 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1765 0 0 unless exists $opts->{'chat_id'}
1766 0 0 unless length $opts->{'chat_id'}
1767 0 0 unless exists $opts->{'user_id'}
1773 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1787 0 0 unless exists $opts->{'chat_id'}
1788 0 0 unless length $opts->{'chat_id'}
1794 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1808 0 0 unless exists $opts->{'chat_id'}
1809 0 0 unless length $opts->{'chat_id'}
1810 0 0 unless exists $opts->{'message_id'}
1816 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1830 0 0 unless exists $opts->{'chat_id'}
1831 0 0 unless length $opts->{'chat_id'}
1832 0 0 unless exists $opts->{'user_id'}
1838 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1852 0 0 unless exists $opts->{'chat_id'}
1853 0 0 unless length $opts->{'chat_id'}
1854 0 0 unless exists $opts->{'permissions'}
1855 0 0 if ref $opts->{'permissions'} ne 'Net::API::Telegram::ChatPermissions'
1856 0 0 unless exists $opts->{'user_id'}
1857 0 0 unless $self->_load(['Net::API::Telegram::ChatPermissions'])
1863 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1877 0 0 unless exists $opts->{'animation'}
1878 0 0 unless ref($opts->{'animation'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1879 0 0 unless exists $opts->{'chat_id'}
1880 0 0 unless length $opts->{'chat_id'}
1881 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)$/
1882 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1883 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'])
1889 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1905 0 0 unless exists $opts->{'audio'}
1906 0 0 unless ref($opts->{'audio'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1907 0 0 unless exists $opts->{'chat_id'}
1908 0 0 unless length $opts->{'chat_id'}
1909 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)$/
1910 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1911 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'])
1917 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1933 0 0 unless exists $opts->{'action'}
1934 0 0 unless exists $opts->{'chat_id'}
1935 0 0 unless length $opts->{'chat_id'}
1941 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
1955 0 0 unless exists $opts->{'chat_id'}
1956 0 0 unless length $opts->{'chat_id'}
1957 0 0 unless exists $opts->{'first_name'}
1958 0 0 unless exists $opts->{'phone_number'}
1959 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)$/
1960 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
1966 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
1982 0 0 unless exists $opts->{'chat_id'}
1983 0 0 unless length $opts->{'chat_id'}
1984 0 0 unless exists $opts->{'document'}
1985 0 0 unless ref($opts->{'document'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1986 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)$/
1987 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
1988 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'])
1994 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2010 0 0 unless exists $opts->{'chat_id'}
2011 0 0 unless exists $opts->{'game_short_name'}
2012 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
2013 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
2019 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2035 0 0 unless exists $opts->{'chat_id'}
2036 0 0 unless exists $opts->{'currency'}
2037 0 0 unless exists $opts->{'description'}
2038 0 0 unless exists $opts->{'payload'}
2039 0 0 unless exists $opts->{'prices'}
2040 0 0 if ref $opts->{'prices'} ne 'ARRAY'
2041 0 0 unless $self->_param_check_array_object(qr/^(?:Net::API::Telegram::LabeledPrice)$/, @_)
2042 0 0 unless exists $opts->{'provider_token'}
2043 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
2044 0 0 unless exists $opts->{'start_parameter'}
2045 0 0 unless exists $opts->{'title'}
2046 0 0 unless $self->_load(['Net::API::Telegram::LabeledPrice', 'Net::API::Telegram::InlineKeyboardMarkup'])
2052 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2068 0 0 unless exists $opts->{'chat_id'}
2069 0 0 unless length $opts->{'chat_id'}
2070 0 0 unless exists $opts->{'latitude'}
2071 0 0 unless exists $opts->{'longitude'}
2072 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)$/
2073 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
2079 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2095 0 0 unless exists $opts->{'chat_id'}
2096 0 0 unless length $opts->{'chat_id'}
2097 0 0 unless exists $opts->{'media'}
2098 0 0 if ref $opts->{'media'} ne 'ARRAY'
2099 0 0 unless $self->_param_check_array_object(qr/^(?:Net::API::Telegram::InputMediaPhoto|Net::API::Telegram::InputMediaVideo)$/, @_)
2100 0 0 unless $self->_load(['Net::API::Telegram::InputMediaPhoto', 'Net::API::Telegram::InputMediaVideo'])
2106 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2127 0 0 unless exists $opts->{'chat_id'}
2128 0 0 unless length $opts->{'chat_id'}
2129 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)$/
2130 0 0 unless exists $opts->{'text'}
2131 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
2137 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2153 0 0 unless exists $opts->{'chat_id'}
2154 0 0 unless length $opts->{'chat_id'}
2155 0 0 unless exists $opts->{'photo'}
2156 0 0 unless ref($opts->{'photo'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2157 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)$/
2158 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'])
2164 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2180 0 0 unless exists $opts->{'chat_id'}
2181 0 0 unless length $opts->{'chat_id'}
2182 0 0 unless exists $opts->{'options'}
2183 0 0 if ref $opts->{'options'} ne 'ARRAY'
2184 0 0 unless exists $opts->{'question'}
2185 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)$/
2186 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
2192 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2208 0 0 unless exists $opts->{'chat_id'}
2209 0 0 unless length $opts->{'chat_id'}
2210 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)$/
2211 0 0 unless exists $opts->{'sticker'}
2212 0 0 unless ref($opts->{'sticker'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2213 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'])
2219 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2235 0 0 unless exists $opts->{'address'}
2236 0 0 unless exists $opts->{'chat_id'}
2237 0 0 unless length $opts->{'chat_id'}
2238 0 0 unless exists $opts->{'latitude'}
2239 0 0 unless exists $opts->{'longitude'}
2240 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)$/
2241 0 0 unless exists $opts->{'title'}
2242 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardMarkup', 'Net::API::Telegram::ReplyKeyboardRemove', 'Net::API::Telegram::ForceReply'])
2248 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2264 0 0 unless exists $opts->{'chat_id'}
2265 0 0 unless length $opts->{'chat_id'}
2266 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)$/
2267 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2268 0 0 unless exists $opts->{'video'}
2269 0 0 unless ref($opts->{'video'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2270 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'])
2276 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2292 0 0 unless exists $opts->{'chat_id'}
2293 0 0 unless length $opts->{'chat_id'}
2294 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)$/
2295 0 0 if length $opts->{'thumb'} and not ref($opts->{'thumb'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2296 0 0 unless exists $opts->{'video_note'}
2297 0 0 unless ref($opts->{'video_note'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2298 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'])
2304 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2320 0 0 unless exists $opts->{'chat_id'}
2321 0 0 unless length $opts->{'chat_id'}
2322 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)$/
2323 0 0 unless exists $opts->{'voice'}
2324 0 0 unless ref($opts->{'voice'}) =~ /^(?:Net::API::Telegram::InputFile)$/
2325 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'])
2331 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2347 0 0 unless exists $opts->{'chat_id'}
2348 0 0 unless length $opts->{'chat_id'}
2354 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2368 0 0 unless exists $opts->{'chat_id'}
2369 0 0 unless length $opts->{'chat_id'}
2370 0 0 unless exists $opts->{'permissions'}
2371 0 0 if ref $opts->{'permissions'} ne 'Net::API::Telegram::ChatPermissions'
2372 0 0 unless $self->_load(['Net::API::Telegram::ChatPermissions'])
2378 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2392 0 0 unless exists $opts->{'chat_id'}
2393 0 0 unless length $opts->{'chat_id'}
2394 0 0 unless exists $opts->{'photo'}
2395 0 0 if ref $opts->{'photo'} ne 'Net::API::Telegram::InputFile'
2396 0 0 unless $self->_load(['Net::API::Telegram::InputFile'])
2402 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2416 0 0 unless exists $opts->{'chat_id'}
2417 0 0 unless length $opts->{'chat_id'}
2418 0 0 unless exists $opts->{'sticker_set_name'}
2424 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2438 0 0 unless exists $opts->{'chat_id'}
2439 0 0 unless length $opts->{'chat_id'}
2440 0 0 unless exists $opts->{'title'}
2446 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2460 0 0 unless exists $opts->{'score'}
2461 0 0 unless exists $opts->{'user_id'}
2467 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2487 0 0 unless exists $opts->{'errors'}
2488 0 0 if ref $opts->{'errors'} ne 'ARRAY'
2489 0 0 unless $self->_param_check_array_object(qr/^(?:Net::API::Telegram::PassportElementError)$/, @_)
2490 0 0 unless exists $opts->{'user_id'}
2491 0 0 unless $self->_load(['Net::API::Telegram::PassportElementError'])
2497 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2511 0 0 if $opts->{'certificate'} and $self->{'ssl_cert'}
2512 0 0 if length $opts->{'allowed_updates'} and ref $opts->{'allowed_updates'} ne 'ARRAY'
2513 0 0 if length $opts->{'certificate'} and ref $opts->{'certificate'} ne 'Net::API::Telegram::InputFile'
2514 0 0 unless exists $opts->{'url'}
2515 0 0 unless $self->_load(['Net::API::Telegram::InputFile'])
2521 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2535 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
2536 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
2542 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2562 0 0 unless exists $opts->{'chat_id'}
2563 0 0 unless length $opts->{'chat_id'}
2564 0 0 unless exists $opts->{'message_id'}
2565 0 0 if length $opts->{'reply_markup'} and ref $opts->{'reply_markup'} ne 'Net::API::Telegram::InlineKeyboardMarkup'
2566 0 0 unless $self->_load(['Net::API::Telegram::InlineKeyboardMarkup'])
2572 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2588 0 0 unless exists $opts->{'chat_id'}
2589 0 0 unless length $opts->{'chat_id'}
2590 0 0 unless exists $opts->{'user_id'}
2596 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2610 0 0 unless exists $opts->{'chat_id'}
2611 0 0 unless length $opts->{'chat_id'}
2617 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
2631 0 0 unless exists $opts->{'png_sticker'}
2632 0 0 if ref $opts->{'png_sticker'} ne 'Net::API::Telegram::InputFile'
2633 0 0 unless exists $opts->{'user_id'}
2634 0 0 unless $self->_load(['Net::API::Telegram::InputFile'])
2640 0 0 if (my $t_error = $self->_has_telegram_error($hash)) { }
0 0 elsif ($hash->{'result'}) { }
2659 0 0 if ($self->{'_encode_with_json'})
2669 0 0 if ($pkg and $pkg =~ /^AI::Net::Stripe/ and exists $value->{'id'})
2676 0 0 if ($ref eq 'HASH') { }
0 0 elsif ($ref eq 'ARRAY') { }
2682 0 0 if ref $sv or not length $sv
2691 0 0 if ref $sv
2698 0 0 $value ? :
0 0 ref $value eq 'JSON::PP::Boolean' ? :
2716 0 0 unless exists $hash->{'ok'}
2717 0 0 if $hash->{'ok'}
2723 0 0 if (exists $hash->{'parameters'} and ref $hash->{'parameters'} eq 'HASH')
2725 0 0 if ($hash->{'parameters'}{'retry_after'})
2727 0 0 if length $desc
2740 0 0 if exists $self->{$name} and &Scalar::Util::blessed($self->{$name})
2754 0 0 if ref $arr ne 'ARRAY'
2759 0 0 if $@
2768 0 0 unless -e $fpath
2769 0 0 unless -r $fpath
2770 0 0 if -s $fpath > 52428800
2780 0 0 unless (exists $args->{'file'} and exists $args->{'line'})
2797 0 0 if ref $opts ne 'HASH'
2804 0 0 if (&Scalar::Util::blessed($this)) { }
0 0 elsif (ref $this eq 'HASH') { }
0 0 elsif (ref $this eq 'ARRAY') { }
2806 0 0 if ref($this) =~ /Net::API::Telegram::/ and $this->can('debug')
2808 0 0 if ($this->can('as_hash')) { }
0 0 elsif (overload::Overloaded($this)) { }
0 0 elsif ($this->can('as_string')) { }
2832 0 0 if (exists $this->{$opt_anti_loop})
2851 0 0 if length $res
2866 0 0 if (length $opts->{$k})
2879 0 0 if (scalar @_)
2881 0 0 if (ref $_[0] eq 'HASH') { }
0 0 elsif (not scalar(@_) % 2) { }
2902 0 0 if ref $patt ne 'Regexp'
2903 0 0 if ref $arr ne 'ARRAY'
2906 0 0 unless ref($o) =~ /$patt/
2916 0 0 if $hash and ref $hash ne 'HASH'
2918 0 0 unless $self->_load([$class])
2924 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 length $@ ? :
0 0 if ($Nice::Try::HAS_CATCH)
0 0 if ($Nice::Try::DIED)
2927 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 $Nice::Try::WANTARRAY ? :
0 0 if (defined $Nice::Try::WANTARRAY and not ref $Nice::Try::RETVAL[0] && $Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL'))
2937 0 0 if $arr and ref $arr ne 'ARRAY'
2939 0 0 unless $self->_load([$class])
2943 0 0 if (ref $ref eq 'HASH') { }
2950 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 length $@ ? :
0 0 if ($Nice::Try::HAS_CATCH)
0 0 if ($Nice::Try::DIED)
2953 0 0 if ($Nice::Try::WANTARRAY) { }
0 0 elsif (defined $Nice::Try::WANTARRAY) { }
0 0 $Nice::Try::WANTARRAY ? :
0 0 if (defined $Nice::Try::WANTARRAY and not ref $Nice::Try::RETVAL[0] && $Nice::Try::RETVAL[0]->isa('Nice::Try::SENTINEL'))