File: main_subs_and_pod.pl

package info (click to toggle)
libperl-metrics-simple-perl 0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 268 kB
  • ctags: 99
  • sloc: perl: 1,161; makefile: 2
file content (47 lines) | stat: -rw-r--r-- 960 bytes parent folder | download
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
42
43
44
45
46
47
# $Header: /Users/matisse/Desktop/CVS2GIT/matisse.net.cvs/Perl-Metrics-Simple/t/more_test_files/main_subs_and_pod.pl,v 1.1 2008/03/15 18:07:51 matisse Exp $
# $Revision: 1.1 $
# $Author: matisse $
# $Source: /Users/matisse/Desktop/CVS2GIT/matisse.net.cvs/Perl-Metrics-Simple/t/more_test_files/main_subs_and_pod.pl,v $
# $Date: 2008/03/15 18:07:51 $

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