1

Use check for defined value after eval(), style fixes, fix typo in sub name and var name

This commit is contained in:
eleksir
2021-03-29 00:19:51 +03:00
parent a406c7c717
commit eb12b23a3d
11 changed files with 38 additions and 36 deletions

View File

@@ -37,7 +37,7 @@ sub Monkeyuser {
do {
$#a = -1;
@a = $p->get_tag('a'); ## no critic (Variables::RequireLocalizedPunctuationVars)
@a = $p->get_tag ('a'); ## no critic (Variables::RequireLocalizedPunctuationVars)
if (defined $a[0][1]->{class} && $a[0][1]->{class} eq 'lazyload small-image') {
if (defined $a[0][1]->{'data-src'} && ($a[0][1]->{'data-src'} !~ /adlitteram/)) {
@@ -48,7 +48,7 @@ sub Monkeyuser {
} while ($#{$a[0]} > 1);
if ($#link > 0) {
$ret = sprintf 'https://www.monkeyuser.com%s', $link [irand (1 + $#link)];
$ret = sprintf 'https://www.monkeyuser.com%s', $link[irand (1 + $#link)];
}
} else {
cluck sprintf 'Server return status %s with message: %s', $r->{status}, $r->{reason};