Add "use warnings" + correct subroutine prototypes declaration

This commit is contained in:
Dirk
2026-09-01 15:21:10 +02:00
parent 8ab28557a1
commit 7e1cd8a8c4
6 changed files with 12 additions and 6 deletions
+2 -1
View File
@@ -7,6 +7,7 @@
# "finding" : "Scan interrupted"
use strict;
use warnings;
use Test::More;
use Data::Dumper;
use JSON;
@@ -98,7 +99,7 @@ done_testing($tests);
printf "\n\n";
sub json($) {
sub json {
my $file = shift;
$file = `cat $file`;
unlink $file;
+2 -1
View File
@@ -10,6 +10,7 @@
# - Hosts which match the regex patterns should be avoided
use strict;
use warnings;
use Test::More;
use Data::Dumper;
# use JSON;
@@ -150,7 +151,7 @@ if ( $os ne "darwin" ){
done_testing($tests);
# unlink "tmp.json";
sub json($) {
sub json {
my $file = shift;
$file = `cat $file`;
unlink $file;
+2 -1
View File
@@ -7,6 +7,7 @@
# "finding" : "Scan interrupted"
use strict;
use warnings;
use Test::More;
use Data::Dumper;
# if needed: comment this and the lines below in:
@@ -64,7 +65,7 @@ done_testing($tests);
printf "\n";
sub json($) {
sub json {
my $file = shift;
$file = `cat $file`;
unlink $file;
+2 -1
View File
@@ -4,6 +4,7 @@
#
use strict;
use warnings;
use Test::More;
use JSON;
@@ -94,7 +95,7 @@ if ( $os eq "linux" ){
done_testing($tests);
printf "\n\n";
sub json($) {
sub json {
my $file = shift;
$file = `cat $file`;
unlink $file;
+2 -1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Data::Dumper;
use JSON;
@@ -66,7 +67,7 @@ is($found,0,"We should not have any finding with INFO level"); $tests++;
done_testing($tests);
printf "\n\n";
sub json($) {
sub json {
my $file = shift;
$file = `cat $file`;
unlink $file;
+2 -1
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Data::Dumper;
use JSON;
@@ -154,7 +155,7 @@ is($found,1,"We should have a finding for this in the JSON output"); $tests++;
done_testing($tests);
sub json($) {
sub json {
my $file = shift;
$file = `cat $file`;
unlink $file;