line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Filesys::MakeISO; |
2
|
2
|
|
|
2
|
|
43600
|
use version; $VERSION = qv('0.1.0'); |
|
2
|
|
|
|
|
3802
|
|
|
2
|
|
|
|
|
11
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Filesys::MakeISO - make iso images (portable) |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
This document describes Filesys::MakeISO version 0.1.0 |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use Filesys::MakeISO; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $iso = Filesys::MakeISO->new; |
17
|
|
|
|
|
|
|
$iso->image('image.iso'); |
18
|
|
|
|
|
|
|
$iso->dir('/path/to/burn'); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$iso->make_iso; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
2
|
|
140
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
42
|
|
25
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
46
|
|
26
|
|
|
|
|
|
|
|
27
|
2
|
|
|
2
|
|
10
|
use Carp (); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
40
|
|
28
|
|
|
|
|
|
|
use Module::Pluggable |
29
|
2
|
|
|
|
|
16
|
sub_name => 'drivers', |
30
|
2
|
|
|
2
|
|
1682
|
search_path => [qw(Filesys::MakeISO::Driver)]; |
|
2
|
|
|
|
|
21991
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
#=head1 DESCRIPTION |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 INTERFACE |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head2 drivers |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Returns a list of available driver classes. This method is provied by |
39
|
|
|
|
|
|
|
L. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head2 new [PARAMS] |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Create a new L object if a suitable driver class is |
44
|
|
|
|
|
|
|
found. If not C is returned. |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Valid PARAMS are: |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=over 4 |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item class |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Use (only) this driver class. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=back |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Additional parameters are passed to the driver classes, for example to |
57
|
|
|
|
|
|
|
specify the binary location. Look in the C |
58
|
|
|
|
|
|
|
namespace for driver classes. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub new { |
63
|
1
|
|
|
1
|
1
|
13
|
my ($class, %arg) = @_; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# which driver classes to try? |
66
|
1
|
|
|
|
|
2
|
my @driver = (); |
67
|
1
|
50
|
|
|
|
4
|
if ($arg{class}) { |
68
|
0
|
|
|
|
|
0
|
@driver = ($arg{class}); |
69
|
0
|
|
|
|
|
0
|
delete $arg{class}; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
else { |
72
|
1
|
|
|
|
|
8
|
@driver = $class->drivers; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
1
|
|
|
|
|
392
|
my $self = undef; |
76
|
1
|
|
|
|
|
3
|
foreach my $class (@driver) { |
77
|
1
|
|
|
|
|
75
|
eval "require $class"; |
78
|
1
|
50
|
|
|
|
5
|
next if $@; |
79
|
1
|
|
|
|
|
7
|
$self = $class->new(%arg); |
80
|
1
|
50
|
|
|
|
14
|
last if $self; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
1
|
|
|
|
|
4
|
return $self; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head2 joliet [BOOLEAN] |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Get/set Joliet extension (Win32). |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=cut |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub joliet { |
93
|
0
|
|
|
0
|
1
|
|
my ($self, $joliet) = @_; |
94
|
|
|
|
|
|
|
|
95
|
0
|
0
|
|
|
|
|
if (defined $joliet) { |
96
|
0
|
|
|
|
|
|
$self->{joliet} = $joliet; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
0
|
|
|
|
|
|
return $self->{joliet}; |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 rock_ridge [BOOLEAN] |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Get/set Rock Ridge extension (Unix). |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=cut |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
sub rock_ridge { |
109
|
0
|
|
|
0
|
1
|
|
my ($self, $rock_ridge) = @_; |
110
|
|
|
|
|
|
|
|
111
|
0
|
0
|
|
|
|
|
if (defined $rock_ridge) { |
112
|
0
|
|
|
|
|
|
$self->{rock_ridge} = $rock_ridge; |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
0
|
|
|
|
|
|
return $self->{rock_ridge}; |
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head2 image [NAME] |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Get/set name (and path) of image file. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=cut |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub image { |
125
|
0
|
|
|
0
|
1
|
|
my ($self, $image) = @_; |
126
|
|
|
|
|
|
|
|
127
|
0
|
0
|
|
|
|
|
if (defined $image) { |
128
|
0
|
|
|
|
|
|
$self->{image} = $image; |
129
|
|
|
|
|
|
|
} |
130
|
|
|
|
|
|
|
|
131
|
0
|
|
|
|
|
|
return $self->{image}; |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head2 dir [DIRECTORY] |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Get/set directory with files to make an iso of. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=cut |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
sub dir { |
141
|
0
|
|
|
0
|
1
|
|
my ($self, $dir) = @_; |
142
|
|
|
|
|
|
|
|
143
|
0
|
0
|
|
|
|
|
if (defined $dir) { |
144
|
0
|
|
|
|
|
|
$self->{dir} = $dir; |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
0
|
|
|
|
|
|
return $self->{dir}; |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head2 make_iso |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
Create the iso image and save it to L. Return true on success |
153
|
|
|
|
|
|
|
and false on failure. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=cut |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
sub _check_params { |
158
|
0
|
|
|
0
|
|
|
my ($self) = @_; |
159
|
|
|
|
|
|
|
|
160
|
0
|
0
|
|
|
|
|
Carp::croak("IMAGE missing") unless $self->image; |
161
|
|
|
|
|
|
|
|
162
|
0
|
0
|
|
|
|
|
Carp::croak("DIR missing") unless $self->dir; |
163
|
|
|
|
|
|
|
|
164
|
0
|
|
|
|
|
|
return 1; |
165
|
|
|
|
|
|
|
} |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
1; |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=head1 DIAGNOSTICS |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=over 4 |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=item C<< IMAGE missing >> |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
A call to L without setting an L |
177
|
|
|
|
|
|
|
L with this message. |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=item C<< DIR missing >> |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
A call to L without setting an L |
182
|
|
|
|
|
|
|
L with this message. |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=back |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head1 CONFIGURATION AND ENVIRONMENT |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
Filesys::MakeISO requires no configuration files or environment variables. |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
L |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
You need a driver class (and the matching tool) installed. See the |
195
|
|
|
|
|
|
|
C namespace for drivers. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=head1 INCOMPATIBILITIES |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
None reported. |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=head1 BUGS AND LIMITATIONS |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
No bugs have been reported. |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
206
|
|
|
|
|
|
|
C, or through the web interface at |
207
|
|
|
|
|
|
|
L. |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
=head1 AUTHOR |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
Uwe Voelker C<< uwe.voelker@gmx.de >> |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
Copyright (c) 2006, Uwe Voelker C<< uwe.voelker@gmx.de >>. |
216
|
|
|
|
|
|
|
All rights reserved. |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
This module is free software; you can redistribute it and/or |
219
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. See C. |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTY |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
224
|
|
|
|
|
|
|
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
225
|
|
|
|
|
|
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
226
|
|
|
|
|
|
|
PROVIDE THE SOFTWARE ''AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER |
227
|
|
|
|
|
|
|
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
228
|
|
|
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE |
229
|
|
|
|
|
|
|
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH |
230
|
|
|
|
|
|
|
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL |
231
|
|
|
|
|
|
|
NECESSARY SERVICING, REPAIR, OR CORRECTION. |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
234
|
|
|
|
|
|
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
235
|
|
|
|
|
|
|
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE |
236
|
|
|
|
|
|
|
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, |
237
|
|
|
|
|
|
|
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE |
238
|
|
|
|
|
|
|
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING |
239
|
|
|
|
|
|
|
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A |
240
|
|
|
|
|
|
|
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF |
241
|
|
|
|
|
|
|
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
242
|
|
|
|
|
|
|
SUCH DAMAGES. |