Msi.pm (677600b0) Msi.pm (f1e0dfd3)
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 55 unchanged lines hidden (view full) ---

64
65
66
67
68
69
70=head2 new($class, $filename, $version, $is_current_version, $language, $product_name)
71
1#**************************************************************
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance

--- 55 unchanged lines hidden (view full) ---

64
65
66
67
68
69
70=head2 new($class, $filename, $version, $is_current_version, $language, $product_name)
71
72 Create a new object of the Msi class. The values of $version, $language, and $product_name define
72 Create a new object of the Msi class. The values of $version, $language, and $product_name define
73 where to look for the msi file.
74
75 If construction fails then IsValid() will return false.
76
77=cut
78
79sub new ($$;$$$$)
80{

--- 50 unchanged lines hidden (view full) ---

131 return $self->{'is_valid'};
132}
133
134
135
136
137=head2 Commit($self)
138
73 where to look for the msi file.
74
75 If construction fails then IsValid() will return false.
76
77=cut
78
79sub new ($$;$$$$)
80{

--- 50 unchanged lines hidden (view full) ---

131 return $self->{'is_valid'};
132}
133
134
135
136
137=head2 Commit($self)
138
139 Write all modified tables back into the databse.
139 Write all modified tables back into the database.
140
141=cut
142
143sub Commit ($)
144{
145 my $self = shift;
146
147 my @tables_to_update = ();

--- 19 unchanged lines hidden (view full) ---

167 }
168}
169
170
171
172
173=head2 GetTable($seld, $table_name)
174
140
141=cut
142
143sub Commit ($)
144{
145 my $self = shift;
146
147 my @tables_to_update = ();

--- 19 unchanged lines hidden (view full) ---

167 }
168}
169
170
171
172
173=head2 GetTable($seld, $table_name)
174
175 Return an MsiTable object for $table_name. Table objects are kept
176 alive for the life time of the Msi object. Therefore the second
175 Return an MsiTable object for $table_name. Table objects are kept
176 alive for the life time of the Msi object. Therefore the second
177 call for the same table is very cheap.
178
179=cut
180
181sub GetTable ($$)
182{
183 my ($self, $table_name) = @_;
184

--- 22 unchanged lines hidden (view full) ---

207 return $table;
208}
209
210
211
212
213=head2 PutTable($self, $table)
214
177 call for the same table is very cheap.
178
179=cut
180
181sub GetTable ($$)
182{
183 my ($self, $table_name) = @_;
184

--- 22 unchanged lines hidden (view full) ---

207 return $table;
208}
209
210
211
212
213=head2 PutTable($self, $table)
214
215 Write the given table back to the databse.
215 Write the given table back to the database.
216
217=cut
218
219sub PutTable ($$)
220{
221 my ($self, $table) = @_;
222
223 # Create text file from the current table content.

--- 61 unchanged lines hidden (view full) ---

285
286
287
288
289=head2 SplitLongShortName($name)
290
291 Split $name (typically from the 'FileName' column in the 'File'
292 table or 'DefaultDir' column in the 'Directory' table) at the '|'
216
217=cut
218
219sub PutTable ($$)
220{
221 my ($self, $table) = @_;
222
223 # Create text file from the current table content.

--- 61 unchanged lines hidden (view full) ---

285
286
287
288
289=head2 SplitLongShortName($name)
290
291 Split $name (typically from the 'FileName' column in the 'File'
292 table or 'DefaultDir' column in the 'Directory' table) at the '|'
293 into short (8.3) and long names. If there is no '|' in $name then
293 into short (8.3) and long names. If there is no '|' in $name then
294 $name is returned as both short and long name.
295
296 Returns long and short name (in this order) as array.
297
298=cut
299
300sub SplitLongShortName ($)
301{

--- 9 unchanged lines hidden (view full) ---

311 }
312}
313
314
315
316=head2 SplitTargetSourceLongShortName ($name)
317
318 Split $name first at the ':' into target and source parts and each
294 $name is returned as both short and long name.
295
296 Returns long and short name (in this order) as array.
297
298=cut
299
300sub SplitLongShortName ($)
301{

--- 9 unchanged lines hidden (view full) ---

311 }
312}
313
314
315
316=head2 SplitTargetSourceLongShortName ($name)
317
318 Split $name first at the ':' into target and source parts and each
319 of those at the '|'s into long and short parts. Names that follow
319 of those at the '|'s into long and short parts. Names that follow
320 this pattern come from the 'DefaultDir' column in the 'Directory'
321 table.
322
323=cut
324
325sub SplitTargetSourceLongShortName ($)
326{
327 my ($name) = @_;

--- 182 unchanged lines hidden ---
320 this pattern come from the 'DefaultDir' column in the 'Directory'
321 table.
322
323=cut
324
325sub SplitTargetSourceLongShortName ($)
326{
327 my ($name) = @_;

--- 182 unchanged lines hidden ---