"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Image/ExifTool/Writer.pl" between
Image-ExifTool-12.57.tar.gz and Image-ExifTool-12.58.tar.gz

About: ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files.

Writer.pl  (Image-ExifTool-12.57):Writer.pl  (Image-ExifTool-12.58)
skipping to change at line 1422 skipping to change at line 1422
} else { } else {
($tag, $dstTag) = ($3, $1); ($tag, $dstTag) = ($3, $1);
$opt = $1 if $dstTag =~ s/\s*([-+])$//; $opt = $1 if $dstTag =~ s/\s*([-+])$//;
# handle expressions # handle expressions
if ($tag =~ /\$/) { if ($tag =~ /\$/) {
$tag = $t; # restore original case $tag = $t; # restore original case
# recover leading whitespace (except for initial single spac e) # recover leading whitespace (except for initial single spac e)
$tag =~ s/(.+?)\s*(>|<) ?//; $tag =~ s/(.+?)\s*(>|<) ?//;
$$opts{EXPR} = 1; # flag this expression $$opts{EXPR} = 1; # flag this expression
} else { } else {
# (not sure why this is here because sign should be before '
<')
# (--> allows "<+" or "<-", which is an undocumented feature
)
$opt = $1 if $tag =~ s/^([-+])\s*//; $opt = $1 if $tag =~ s/^([-+])\s*//;
} }
} }
# validate tag name(s) # validate tag name(s)
unless ($$opts{EXPR} or ValidTagName($tag)) { unless ($$opts{EXPR} or ValidTagName($tag)) {
$self->Warn("Invalid tag name '${tag}'. Use '=' not '<' to assig n a tag value"); $self->Warn("Invalid tag name '${tag}'. Use '=' not '<' to assig n a tag value");
next; next;
} }
ValidTagName($dstTag) or $self->Warn("Invalid tag name '${dstTag}'") , next; ValidTagName($dstTag) or $self->Warn("Invalid tag name '${dstTag}'") , next;
# translate '+' and '-' to appropriate SetNewValue option # translate '+' and '-' to appropriate SetNewValue option
skipping to change at line 4207 skipping to change at line 4209
# in this case because the EXIF block would end up with two TIFF hea ders # in this case because the EXIF block would end up with two TIFF hea ders
last unless $writeProc eq \&Image::ExifTool::WriteTIFF; last unless $writeProc eq \&Image::ExifTool::WriteTIFF;
} }
last unless $self->IsOverwriting($nvHash, $dataPt ? $$dataPt : ''); last unless $self->IsOverwriting($nvHash, $dataPt ? $$dataPt : '');
my $verb = 'Writing'; my $verb = 'Writing';
my $newVal = $self->GetNewValue($nvHash); my $newVal = $self->GetNewValue($nvHash);
unless (defined $newVal and length $newVal) { unless (defined $newVal and length $newVal) {
return '' unless $dataPt or $$dirInfo{RAF}; # nothing to do if block never existed return '' unless $dataPt or $$dirInfo{RAF}; # nothing to do if block never existed
# don't allow MakerNotes to be removed from RAW files # don't allow MakerNotes to be removed from RAW files
if ($blockName eq 'MakerNotes' and $rawType{$$self{FileType}}) { if ($blockName eq 'MakerNotes' and $rawType{$$self{FileType}}) {
$self->Warn("Can't delete MakerNotes from $$self{VALUE}{FileType }",1); $self->Warn("Can't delete MakerNotes from $$self{FileType}",1);
return undef; return undef;
} }
$verb = 'Deleting'; $verb = 'Deleting';
$newVal = ''; $newVal = '';
} }
$$dirInfo{BlockWrite} = 1; # set flag indicating we did a block write $$dirInfo{BlockWrite} = 1; # set flag indicating we did a block write
$out and print $out " $verb $blockName as a block\n"; $out and print $out " $verb $blockName as a block\n";
++$$self{CHANGED}; ++$$self{CHANGED};
return $newVal; return $newVal;
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)