line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Dist::Inno::File; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Perl::Dist::Inno::File - Inno Setup Script [Files] Section Entry |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 DESCRIPTION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
The B class provides a data class that represents |
12
|
|
|
|
|
|
|
an entry in the [Files] section of the Inno Setup Script. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 METHODS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
2
|
|
|
2
|
|
24539
|
use 5.006; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
71
|
|
19
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
52
|
|
20
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
70
|
|
21
|
2
|
|
|
2
|
|
10
|
use Carp qw{ croak }; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
116
|
|
22
|
2
|
|
|
2
|
|
755
|
use Params::Util qw{ _IDENTIFIER _STRING }; |
|
2
|
|
|
|
|
5255
|
|
|
2
|
|
|
|
|
116
|
|
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
2
|
|
11
|
use vars qw{$VERSION}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
86
|
|
25
|
|
|
|
|
|
|
BEGIN { |
26
|
2
|
|
|
2
|
|
124
|
$VERSION = '1.16'; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
2
|
|
|
|
|
23
|
use Object::Tiny qw{ |
30
|
|
|
|
|
|
|
source |
31
|
|
|
|
|
|
|
dest_dir |
32
|
|
|
|
|
|
|
ignore_version |
33
|
|
|
|
|
|
|
recurse_subdirs |
34
|
|
|
|
|
|
|
create_all_subdirs |
35
|
|
|
|
|
|
|
is_readme |
36
|
2
|
|
|
2
|
|
17469
|
}; |
|
2
|
|
|
|
|
998
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
##################################################################### |
43
|
|
|
|
|
|
|
# Constructors |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub new { |
46
|
1
|
|
|
1
|
0
|
21
|
my $self = shift->SUPER::new(@_); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# Apply defaults |
49
|
1
|
50
|
|
|
|
33
|
unless ( defined $self->ignore_version ) { |
50
|
1
|
|
|
|
|
12
|
$self->{ignore_version} = 1; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# Normalize params |
54
|
1
|
|
|
|
|
18
|
$self->{ignore_version} = !! $self->ignore_version; |
55
|
1
|
|
|
|
|
22
|
$self->{recurse_subdirs} = !! $self->recurse_subdirs; |
56
|
1
|
|
|
|
|
21
|
$self->{create_all_subdirs} = !! $self->create_all_subdirs; |
57
|
1
|
|
|
|
|
22
|
$self->{is_readme} = !! $self->is_readme; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
# Check params |
60
|
1
|
50
|
|
|
|
20
|
unless ( _STRING($self->source) ) { |
61
|
0
|
|
|
|
|
0
|
croak("Missing or invalid source param"); |
62
|
|
|
|
|
|
|
} |
63
|
1
|
50
|
|
|
|
24
|
unless ( _STRING($self->dest_dir) ) { |
64
|
0
|
|
|
|
|
0
|
croak("Missing or invalid dest_dir param"); |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
1
|
|
|
|
|
7
|
return $self; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
##################################################################### |
75
|
|
|
|
|
|
|
# Main Methods |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub as_string { |
78
|
1
|
|
|
1
|
0
|
1869
|
my $self = shift; |
79
|
1
|
|
|
|
|
2
|
my @flags = (); |
80
|
1
|
50
|
|
|
|
20
|
push @flags, 'ignoreversion' if $self->ignore_version; |
81
|
1
|
50
|
|
|
|
23
|
push @flags, 'recursesubdirs' if $self->recurse_subdirs; |
82
|
1
|
50
|
|
|
|
21
|
push @flags, 'createallsubdirs' if $self->create_all_subdirs; |
83
|
1
|
50
|
|
|
|
21
|
push @flags, 'isreadme' if $self->is_readme; |
84
|
1
|
50
|
|
|
|
23
|
return join( '; ', |
85
|
|
|
|
|
|
|
"Source: \"" . $self->source . "\"", |
86
|
|
|
|
|
|
|
"DestDir: \"" . $self->dest_dir . "\"", |
87
|
|
|
|
|
|
|
(scalar @flags) |
88
|
|
|
|
|
|
|
? ("Flags: " . join(' ', @flags)) |
89
|
|
|
|
|
|
|
: (), |
90
|
|
|
|
|
|
|
); |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
1; |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=pod |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 SUPPORT |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
Bugs should be reported via the CPAN bug tracker at |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
L |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
For other issues, contact the author. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 AUTHOR |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Adam Kennedy Eadamk@cpan.orgE |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 SEE ALSO |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
L |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=head1 COPYRIGHT |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
Copyright 2007 - 2009 Adam Kennedy. |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
This program is free software; you can redistribute |
118
|
|
|
|
|
|
|
it and/or modify it under the same terms as Perl itself. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
The full text of the license can be found in the |
121
|
|
|
|
|
|
|
LICENSE file included with this module. |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=cut |