1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
package main_subs_and_pod; # 1
use strict; # 2
use warnings; # 3
our $VERSION = '1.0'; # 4
our $EXPECTED_NON_SUB_LINES = 8; #5
exit run(@ARGV) if not caller(); # 6
sub run {
my @args = @_;
say( @args );
return 1;
}
sub say {
my @args = @_;
print "@args";
}
1; # 7 This line is in "main" and so counts as a non-subroutine line.
# the __END__ token also counts as a line of code.s
__END__
bad_line of code
=pod
=head1 NAME
Fake::Package::For::Testing
=head1 DESCRIPTION
Used to test counts of lines not in any subroutine. That count should NOT
includes comments and pod.
=cut
|