line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
2
|
1
|
|
|
1
|
|
476
|
use lib 'lib'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
3
|
1
|
|
|
1
|
|
514
|
use Applify; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
option str => iiiiiii => 'asd'; |
6
|
|
|
|
|
|
|
option str => x => 'asd'; |
7
|
|
|
|
|
|
|
option file => input_file => 'File to read from', 'Makefile.PL', alias => 'i'; |
8
|
|
|
|
|
|
|
option str => output_dir => 'Directory to write files to', n_of => '0,2'; |
9
|
|
|
|
|
|
|
option flag => dry_run => 'Use --no-dry-run to actually do something', required => 1; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
version 1.23; |
12
|
|
|
|
|
|
|
documentation __FILE__; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub app::generate_exit_value { |
15
|
0
|
|
|
0
|
|
|
return int rand 100; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
app { |
19
|
|
|
|
|
|
|
my ($self, @extra) = @_; |
20
|
|
|
|
|
|
|
my $exit_value = 0; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
print "Extra arguments: @extra\n" if (@extra); |
23
|
|
|
|
|
|
|
print "Will read from: ", $self->input_file, "\n"; |
24
|
|
|
|
|
|
|
print "Will write files to ", int @{$self->output_dir}, " output dirs\n"; |
25
|
|
|
|
|
|
|
print "Will write files to: ", join(', ', @{$self->output_dir}), "\n"; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
if ($self->dry_run) { |
28
|
|
|
|
|
|
|
die 'Will not run script'; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
return $self->generate_exit_value; |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
test1.pl - Example script |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SYNOPSIS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Some description... |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
test1.pl --help |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 DESCRIPTION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
This script is just an example script... |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 AUTHOR |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
See L. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |