|
Good news... However you should never have to save, reload and save a file to update the document content and the manifest separately. It undoubtedly works but it's counter-performing because the physical file is saved twice. When several document parts are connected to the same container, the save() method of one of the parts makes all the changes persistent. In the example below, $meta and $manifest are connected to the same container as $document, and the last instruction saves all. Of course, the 'container' parameter of each secondary part must be set to the primary document object and *not* to the filename!
my $document = odfDocument(file => "myfile.odt");
my $meta = odfMeta(container => $document);
my $manifest = odfManifest(container => $document);
# ...process the various parts
$document->save();
|