lexiftool runs the same command lines as exiftool 13.59 and gives the same
output (checked byte for byte against the Perl original, over its test
images and a corpus of camera sample images). Where it cannot, because the
original runs Perl code that the user supplies, it says so instead of
failing silently.
- An exiftool config file is Perl code; lexiftool does not run it. It reads
a Perl config file as data when the file only assigns package variables
with literal values (hashes, lists, strings, numbers, references,
use/requireof ExifTool modules, element assignments,RegisterNamespace; the full list is in configuration.md), which most real config files do. A file with other Perl (sub,my,if, loops, other calls, interpolation, ...) is not used at all: lexiftool warnsConfig file not supported by lexiftool (Perl code at line N: CONSTRUCT): FILEand runs on without it, where exiftool would run the code. The same goes for a piped config (-config -). For such files lexiftool has a config file of its own, written in Lua, that covers the same data: user-defined tags (EXIF, GPS, IPTC, XMP with new namespaces and structures, PNG, MIE, Composite, ...), Shortcuts, Options, Lenses, FileTypes and Arguments. Format, lookup and how to translate a Perl config file are in configuration.md. - The file is looked up as exiftool does:
-config FILE, or the default in$EXIFTOOL_HOME, else$HOME, else$HOMEDRIVE$HOMEPATH, else the current directory, then the directory of thelexiftoolscript. The default is.lexiftool_configwhere one exists in those places, else.ExifTool_config. - A config file is loaded as Lua when its name ends in
.lua, when it is a.lexiftool_config, or when its first line starts with-- lexiftool config. Any other config file is taken for Perl. - A Perl config file that is not valid Perl is rejected with the message
above (naming the line where the parser stops), not with Perl's syntax
error. A file whose last statement is false warns
FILE did not return a true value, without the location in ExifTool.pm that Perl adds. - In a Perl config file,
undefas a hash value leaves the key out, so an option set toundefin%Image::ExifTool::UserDefined::Optionskeeps its default instead of becoming undefined. - An error in a Lua config file is warned as Lua reports it, with file and
line (
FILE:3: unexpected symbol near <eof>), where exiftool warns Perl's message; the command then runs on without that file's configuration. - A
-config FILEthat does not exist gives exiftool's ownConfig file not found.-config ""disables the lookup, as in exiftool. - A conversion (
ValueConv,PrintConv, ...) given as a Perl expression string runs through the same Perl subset as-if(below); anything else is written as a Lua function. xmpStruct(structures by name, kept upstream for backward compatibility only) is not supported; a structure is defined in place.
- exiftool evaluates these as Perl code. lexiftool interprets a subset of
Perl (
perl.evalinsrc/lexiftool/perl.lua) that covers every example in the exiftool documentation and the shipped fmt files, the expressions of the CLI test's expression corpus (doc/cli-tests.md), the conversion code of the bundled config files, plus common constructs:- scalars
$x, arrays@a,$a[0],$a[$i],$#a, hashes%h,$info{'Make'},$h{$key}, slices@a[1, 2],@h{'a', 'b'}, list slices(LIST)[0],(split / /)[-1], captures$1..$Nand$&,myvariables (my ($x, @a, %h)), strings'...',"..."(with the case modifiers\u \l \U \L \Q \E, interpolating variables, elements and longer expressions such as"$h{a}{b} $r->[0] @$r $#a"),q(),qq(),qw() - references:
\$x,\@a,\%h,\$h{key}, anonymous arrays[...]and hashes{...}, the dereferences$$r,@$r,%$r,${...},@{...},%{...},$$r[0],$r->[0],$r->{key}and chains such as$val[0]{RegionList}[1]{Name}(the arrow is optional between subscripts), with Perl's autovivification and the errors ofuse strict(Can't use an undefined value as an ARRAY reference,Not a HASH reference,Can't use string ("abc") as a HASH ref);ref. A reference prints as Perl's does (ARRAY(0x...)); what the code returns or passes to a function is a Lua table again - all arithmetic, string, comparison, logical, bitwise and assignment
operators (
.=,+=,||=, ...),++/--,?:, the range1..5and'a'..'e'and the list repetition(0) x 5in list context,=~/!~withm//,s///(alsos///rands///e) andtr////y///; patterns interpolate variables like strings ($Model =~ /$Make/i,s/$x/y/,split /$sep/) - statements with
if/unless/for/foreach/while/untilmodifiers, blocksif (...) {...} elsif (...) {...} else {...},unless (...) {...},do {...} while ..., and the loopsfor my $x (LIST) {...}(the loop variable is an alias of each element, as$_is inmap,grepands/// for @list),for (INIT; COND; STEP) {...},while (...) {...}anduntil (...) {...}withnextandlast(also with a label), andreturn, whose value is the value of the expression - builtins
defined length lc uc lcfirst ucfirst int abs ord chr hex oct sqrt exp log sin cos atan2 ref quotemeta scalar substr index rindex sprintf join split push unshift shift pop splice reverse rand srand time localtime gmtime pack unpack chomp chop exists delete die warn keys values each,sortwith or without a block (sort { $a <=> $b } ...),mapandgrep(map { ... } LIST,grep /re/, LIST);randis Perl's own generator, so aftersrand(N)it gives Perl's numbers - a capture variable before the expression's own first match: in
${TAG;EXPR}it is, as in exiftool, that of the match that extracted the expression ($1is its text up to the first}) - method calls on the ExifTool object:
$self->GetValue('FileName'),$self->Options('ExtractEmbedded'); a new one withImage::ExifTool->newornew Image::ExifTool - exiftool's helper functions
DateFmt,ShiftTime,NoDups,SetTags, andEnd/EndDirin-if; the other Image::ExifTool functions by name or package-qualified (ConvertFileSize($_),Image::ExifTool::ConvertFileSize($_),Image::ExifTool::GPS::ToDMS(...));require Image::ExifTool::Geolocationandrequire 'Image/ExifTool/Shift.pl'load the module, and the functions of a.plfile are found by name from then on, as in Perl - the warnings of
perl -w: an undefined value or a string that is not a number used in an operator (Use of uninitialized value $info{"Model"} in pattern match (m//),Argument "Canon" isn't numeric in numeric ne (!=)) -- as in exiftool, such a warning fails an-ifcondition and is reported for${TAG;EXPR} - Perl's compile-time warning for a statement whose value is unused
(
$Model; $Make eq "Canon"givesUseless use of hash element in void context, which fails the-ifcondition), with Perl's names for the operators and its constant folding ("abc";warns,1;and0;do not), andFound = in conditionalandScalar value @a[1] better written as $a[1]
- scalars
- Not supported:
sub,local,our,eval,wantarray,redo,goto, code references ($x->()),@_andshift/popwithout an array, the flip-flop..in scalar context, references to a list (\(@a)),deleteof a slice,continueblocks, regex objects (qr//),s///ee,requireof a module that is not part of exiftool (it is Perl code), file and system functions,print. Perl'suse strictcheck is not made: an undeclared variable ($foo) is undefined instead of theuse stricterrorGlobal symbol "$foo" requires explicit package name.keys,valuesandeachlist a hash in string order (Perl's order is unpredictable). An undefined value stored in a hash element does not exist in a Lua table: the key is absent (existsis false, and a structure the code builds lacks the field, where exiftool shows it empty); in an array it is a hole that still counts for the length. An empty pattern (//, or one that interpolates to nothing) matches the empty string instead of repeating the last successful pattern; in-if,$1before the condition's own first match is undefined. Valid Perl outside the subset givesPerl syntax unsupported in lexiftool: WHAT (near "...")-- as a warning for${TAG;EXPR}(the value stays as it was, like a failed expression in exiftool), and for-ifasCondition: Perl syntax unsupported in lexiftool: ...even without-v(exiftool reports a failing condition only with-v); the file then fails the condition. - A genuine syntax error is reported like Perl's (
syntax error ...).
- lexiftool's regular expressions are PCRE2's. An expression that does not
compile -- the API option
NoWarningis checked when it is set -- is reported with PCRE2's reason and the pattern marked where PCRE2 stopped (NoWarning: missing closing parenthesis in regex; marked by <-- HERE in m/( <-- HERE /), where exiftool gives Perl's (Unmatched ( in regex; ...). - An empty
NoWarning(-api NoWarning^=) suppresses every warning. In Perl an empty pattern reuses the last successfully matched one, so what exiftool suppresses depends on the regex it happened to run before.
- exiftool runs Perl with warnings on. An API option given an empty or
undefined value where a number is expected (
-api Verbose^=,-api Unknown=,-api ListSep=, ...) makes Perl's interpreter printArgument "" isn't numeric in ...orUse of uninitialized value ..., naming a line of its own source, on stderr -- and where the value is read inside a tag conversion, the same text as aWarningtag (RawConv ItemInfoEntry: Argument "" isn't numeric ...). lexiftool reads such a value the way Perl does (empty and undefined count as 0 and as false) and prints no interpreter warnings. - The same holds for
-validate: where exiftool builds a warning from an undefined value ([minor] Undefined value for :ManualFocusDistancefor the XMP oft/images/XMP.xml, whose directory name is unset), Perl also printsUse of uninitialized value in concatenation (.) or string at .../Validate.pm line N.on stderr. lexiftool gives the same warning without the interpreter line.
- Where exiftool's own code calls Perl's
warnwithout a trailing newline, or the interpreter warns about an operation, Perl appends the location in its source:Internal error at .../Image/ExifTool/Writer.pl line N, <EXIFTOOL_FILE2> chunk 8.(WriteBinaryData, for a size tag whose value is not the 0xfeedfeed placeholder, seen when copying the maker notes of some newer Sony models),Use of uninitialized value in subtraction (-) at .../Writer.pl line N(writing a Leica JPEG whose trailer position is unknown). lexiftool prints the first asInternal error at (eval) line 1.and gives no interpreter warning for the second; the written file is the same. - Inside a tag conversion the location is cut off (exiftool reports
Use of uninitialized value in pattern match (m//) in Minolta:Saturation (ValueConvInv)), and lexiftool gives the same text.
-verprints13.59, as exiftool.-ver -vprintsPerl versionas the Lua version, adds a linelexiftool port IDENTITY, Lua 5.5.0, bytecode yes|no(IDENTITY agit describe, e.g.v13.59.2-3-gabc1234, baked in by the build; orUnknownfor a source checkout or a rock install without that build step), and lists for each optional Perl module the Lua counterpart lexiftool uses in its place (compress.zlib 0.0.1 (zlib 1.3.2)for Compress::Zlib,digest 0.0.1for Digest::MD5 and Digest::SHA (digest scmfor a build from its scm rockspec),compress.brotli 0.0.1 (libbrotli 1.2.0)for IO::Compress/Uncompress::Brotli,compress.bzip2 0.0.1 (libbz2 1.0.8)for IO::Compress::Bzip2,compress.lzma 0.0.1 (liblzma 5.8.3)for Compress::Raw::Lzma,lexiftool.sys (statx)for File::StatX on Linux, the built-in facade for Time::Piece and Time::Local,lexiftool.perl (GCString, Unicode-LineBreak 2019.001 data, Unicode 8.0.0)for Unicode::LineBreak, ...), or(not installed)where that counterpart is missing.
- exiftool aligns translated tag descriptions by their display width
(double-width CJK characters count twice, combining marks not at all)
when the Perl module Unicode::LineBreak is installed, and by their number
of characters otherwise. lexiftool always measures the display width,
with Unicode::GCString's rules and the character data of the
Unicode-LineBreak release named by
-ver -v(built in, generated bytools/gen_gcstring_data.lua): its output matches exiftool with Unicode::LineBreak, not exiftool without it.
-
The larger geolocation database of https://exiftool.org/geolocation.html (
Geolocation500-<date>.zip) brings, next toGeolocation.datandAltNames.dat, the translations of city, region, country and feature names inGeoLang/<lang>.pm. lexiftool reads all of them as they are: unpack the archive and point lexiftool at the directory as for exiftool,-api GeoDir=/PATH/TO/Geolocation500. -
The
.pmfiles are Perl modules that only assign a hash of translations. lexiftool never runs them as Perl; it reads exactly that form as data (comment and blank lines, one'KEY' => 'VALUE',orBAREWORD => 'VALUE',entry per line, single-quoted strings with Perl's\'and\\escapes). A.pmin any other form -- any further statement or code, double-quoted or concatenated strings, heredocs -- is not used: lexiftool warns "GeoLang file not supported by lexiftool (Perl code, not a pure data table): FILE" and leaves that language untranslated, as exiftool leaves it untranslated when therequireof the file fails. -
A language file may also be written in Lua,
GeoLang/<lang>.lua, a file that returns the table of translations (it runs with an empty environment). Deliberate difference: in each directory searched, lexiftool takesGeoLang/<lang>.luabeforeGeoLang/<lang>.pm, so a Lua file overrides the downloaded.pmbeside it (exiftool knows only the.pm). The scripttools/gen_geolang.luaof the lexiftool source tree writes the Lua form of.pmfiles as a starting point for such a file:lua tools/gen_geolang.lua /PATH/TO/Geolocation500(or the
.pmfiles one by one:lua tools/gen_geolang.lua /PATH/TO/Geolocation500/GeoLang/de.pm; a directory argument needs luafilesystem). EachGeoLang/<lang>.luais written next to its.pm, with the same entries in the same order. -
The directories searched are those exiftool searches for the
.pm: the GeoDir directory first, then the module search path (package.pathfor lexiftool, where aDIR/?.luaentry stands forDIR/GeoLang/<lang>.luaandDIR/GeoLang/<lang>.pm;@INCfor exiftool). The first file found decides. A language without either file is not translated.
- lexiftool handles Windows file names natively through the wide API
(
CreateFileW,MoveFileExW,DeleteFileW,CreateDirectoryW,GetFileAttributesW,GetFullPathNameWinlexiftool.sys), so opening files, reading and writing, renaming, deleting and creating directories all work with names outside the ANSI code page. Files are opened withCreateFileWand the same access and sharing flags exiftool uses, and the file times are read and set withGetFileTime/SetFileTimeon the open file, exiftool's workaround for the daylight saving time error of the C runtime'sstat. The Perl original needsWin32::APIandWin32API::Filefor this; where those are missing it falls back to ANSI names.WindowsLongPathis therefore on by default here, and-preservekeepsFileCreateDate(exiftool does both only when the two Perl modules are installed). - Wildcards in file names are expanded by the shell on Unix, so they need no
code there. On Windows the shell does not expand them, so lexiftool does it
itself, as exiftool does:
perl.bsd_globstands in forFile::GlobandFindFileWindows(main.lua) forWin32::FindFile, both native, so a wildcard argument works without an extra module. Directory listings there go throughlexiftool.sys.read_dir(wideFindFirstFileW/FindNextFileW, whatWin32::FindFile::ReadDirdoes), so Unicode names in directories are read as UTF-8 without the Perl module upstream would need.
- The format goes to the C library's own
strftime, as exiftool'sPOSIX::strftimedoes, in theLC_TIMElocale Perl takes from the environment (LC_ALL,LC_TIME,LANG), so the conversions the platform knows -- and the ones it rejects -- behave as in exiftool there. Perl sets that locale for the whole process at startup; lexiftool only reads the environment and loads the locale into an object of its own, which itsstrftime(andTime::Piece'suse_locale, for reading localized dates back) formats with, and never sets the process locale -- the result is the same. One exception: the static C libraryliblexiftool.alinks musl, which has no locale data of its own and cannot read glibc's, so name conversions (%a %A %b %B %p %c %x) give English names there; the command-line tool, the standalone executable (dynamic against glibc) andliblexiftool.souse the system's locale data like Perl. lexiftool followsPOSIX::strftimeof Perl 5.42.1 and later: the date is normalized bymktimewith daylight saving time left to the C library, so a local time that does not exist (inside the spring-forward gap) moves on by the gap (02:30becomes03:30). Perl 5.42.0 and some older versions keep such a time as given.
exiftool implements the option by setting $ENV{TZ} and calling tzset:
the time zone of the whole process changes for good, every other ExifTool
object of the program and the program itself see it, and setting the option
to undef changes nothing back. lexiftool gives the zone to the object that
sets the option instead. Its local times -- dates from Unix times such as
FileModifyDate, -d/DateFormat with %z and %Z, local times that
are written, shifted or converted with QuickTimeUTC, geotag times without
a zone -- use that zone; the environment and the process's time zone stay
as they are, and other objects keep theirs, or the system's. On the command
line there is one object, as in exiftool, and the output is the same.
The value is read as the platform's C library reads TZ, so a value means
what it means to exiftool on that platform:
- Linux and other Unix systems (glibc): a zone ID names a file under
$TZDIR(default/usr/share/zoneinfo), or a file by its absolute path; anything else is a POSIX TZ string (EST5EDT,<+05>-5,CET-1CEST,M3.5.0,M10.5.0/3, the offset positive west of Greenwich). A string with a daylight-saving name but no rule takes the transitions of theposixrulesfile, else the US rules. A value glibc cannot parse is UTC:+05:00is UTC with an empty zone name. - macOS: the same, with the zone files under
/var/db/timezone/zoneinfo; a zone name may be empty, so+05:00is UTC-5 (the reading exiftool's documentation describes). - Windows: the C runtime's format
tzn[+|-]hh[:mm[:ss]][dzn]-- three letters of standard name, the offset, and, if anything follows, daylight saving time by the US rules under the next three letters. Zone IDs are not understood:America/New_Yorkis a zone "Ame" at UTC with US daylight saving time named "ric", as in exiftool on Windows.
A library function called without an object (ConvertUnixTime,
TimeLocal, ...) takes the zone of the object whose method it runs in --
also through a helper object without a zone of its own that the method
creates, as geotagging and copying tags from a file do -- and the system's
zone outside of any. In the command-line tool this concerns the helper
object of -fileOrder, which runs outside the main object's calls: it
sorts by local times of the system's zone, which can order two files
differently from exiftool only where their times fall around a daylight
saving change. Zone files with leap seconds (right/...) are read as if
they had none.
strftime (behind -d/DateFormat) first normalizes the date with the C
library's mktime, and each platform resolves a local time that exists
twice (the hour in which daylight saving time ends) or not at all (the
hour in which it begins) its own way; lexiftool follows the platform's.
On Windows that is the C runtime's: a time in a daylight saving period
shows its daylight-time name, and one before 1970, which the C runtime's
mktime cannot convert, shows the daylight-time name too (empty for a
zone without one), as Perl's strftime does there. (Perl 5.42.0 behaves
otherwise; see "Upstream bugs the port does not reproduce".)
glibc starts from the UTC offset of the previous mktime call, so the
hour that exists twice comes out with the offset of the date converted
before it. In exiftool that offset is shared by the whole process; in
lexiftool each object has its own, which differs only where several objects
with a time zone convert dates in turn.
- exiftool prints numbers with
.as the decimal point: Perl keepsLC_NUMERICat "C" outsideuse locale, which exiftool never uses. lexiftool does the same whatever the process's global C locale is, which matters where it is embedded (C API, a Lua host) and the host has set, say,de_DE(where C's own formatting gives1,5). It does so without touching any locale state: theperlfacade reads the decimal point the C library currently uses (localeconv) and replaces it with.in the numbers it formats (perl.str, the float conversions ofperl.sprintf). The decimal point is read when the library loads, byExifTool:newand, in the C API, before every command; a Lua host that switches its locale between two calls on the sameExifToolobject without one of those formats with the old one. The command-line tool never sets a locale. - exiftool sorts and compares strings as unsigned bytes: Perl's
sort,cmp,lt/gtignore the locale outsideuse locale. Lua's<on two strings goes throughstrcoll, i.e. the host'sLC_COLLATE(de_DEsortsa A ä b B z, PerlA B a b z ä). lexiftool sorts and compares bytewise like Perl whateverLC_COLLATEis -- tag orders (-sort,-Ggrouping), sorted key lists and the few string comparisons of the original (firmware versions, MIE tag order, ...) -- again only reading the locale: under "C"/"POSIX"strcollalready isstrcmpand Lua's own<is used; under any other collation the facade compares through the C module (sys.strless/sys.strcmp). Like the decimal point, the collation is read when the library loads, byExifTool:newand, in the C API, before every command. - exiftool treats a byte string's characters as ASCII: Perl's
\s,\wandlc/ucignoreLC_CTYPEoutsideuse locale. Lua's pattern classes (%a,%s,%w, ...) andstring.lower/upperfollow it, and under a single-byte locale (Windows cp1252, glibc'sde_DEISO-8859-1) they take0xE4for a letter and lower0xC4to0xE4-- which would change UTF-8 text such as place names. lexiftool's own patterns spell their classes as ASCII sets and change case only through theperlfacade (perl.lc/perl.uc, ASCII-only like Perl), so the result is the same under any locale; the regex facade (PCRE2) uses PCRE2's built-in character tables and is not affected. The facade itself, the expression parser and the Geolocation lookups are covered by the unit tests under such a locale. - Remaining difference under such a locale: Lua's own number parsing
(
tonumber) also accepts1,5there, where Perl reads1. The port stringifies numbers only through the facade (perl.str,perl.sprintf, and the regex functions for a number subject);tools/verify_tostring.luarejects atostring()that may see a number, and the unit tests run under ade_DElocale.
- A few code paths of exiftool walk a Perl hash (
keys %hash), whose order Perl randomizes per process, and the result depends on that order. Example: copying the tags of a file whose EXIF directory holds two maker-note entries (tag 0x927c) of different kinds,-tagsFromFile @ -all:all. Both source entries become pending new values for the same tag ID, and which one is written (into both entries) depends on the order in whichGetNewTagInfoHashsees them, so exiftool writes one of two files from run to run. Other cases: the order of some warnings (severalError N placing ... in structure or listwarnings of an XML track log read with-struct), and the order of group names that differ only in case in-listg7. - lexiftool walks such hashes in a fixed order (
perl.keys: the keys in Perl's string order; a hash keyed by tag information, as the pending new values are, by table, tag ID and tag name), so it gives the same result on every run, and that result is one of those exiftool gives. A byte comparison with a single exiftool run can therefore differ for such a file or output. - Fixing Perl's hash seed (
PERL_HASH_SEED=0 PERL_PERTURB_KEYS=0, as the test harness does) makes exiftool repeat its order for hashes with string keys, but not for hashes keyed by references, such as the pending new values: their keys are addresses, which change from run to run on systems with address-space randomization.
- A tag conversion that divides by zero dies in Perl ("Illegal division by
zero"); exiftool's eval leaves the value undefined and warns
(
ValueConv TAG: Illegal division by zero). lexiftool does the same: it reads the floating-point "division by zero" flag around each conversion (and turns Lua's integer division/modulus errors into the same message). One case stays different:0/0of two numbers (the floating-point "invalid" flag, which comparisons with NaN raise as well, so it cannot tell this case apart) givesNaNwhere exiftool drops the value.
- exiftool decrypts and encrypts PDF documents with its own pure-Perl AES
(
Image::ExifTool::AES) and RC4 (RC4Init/RC4CryptinPDF.pm). lexiftool computes both ciphers with the rockscipher.aesandcipher.rc4(lua-cipher, self-contained C) and keeps upstream's entry points as a thin layer over them (lexiftool/AES.lua,RC4Init/RC4Cryptinlexiftool/PDF.lua), so the PDF code around them follows the Perl original line for line. This is the one place where the port does not port the Perl code line for line: the ciphers are self-contained, have nothing to do with metadata, and a cipher computes the same bytes whoever implements it, while upstream's pure-Perl AES makes AES-256 (revision 6) documents take seconds to open. - The output is the same: the same tags and warnings, and the same written bytes. exiftool's random IV for AES encryption is kept as well: seeded from the time and the process id as upstream, with Perl's own random number generator, so the same seed gives the same IV.
- exiftool's warning
Decryption is very slow for encryption V5.6 or higherand its skipping of large AES-encrypted streams without-mare kept as upstream, although lexiftool decrypts them quickly.
- When standard input is no console,
Term::ReadKeyfails and the message ends exiftool as an uncaughtdie; lexiftool prints the sameGetConsoleMode failed, LastError=|6|text, but two details of it differ. The place it names is lexiftool's (.../lexiftool/perl.lua line N, the line that calls into the console) where Perl names.../Term/ReadKey.pm line 346, the corresponding line of the Perl module. And the exit status is 255 where exiftool's is usually 2: an uncaughtdieexits with$!when it is set, and exiftool's$!at that moment is theENOENTitsrequire Term::ReadKeyleft behind while it searched@INC(exiftool's ownlibdirectory comes first and never holds that module) -- a leftover of an unrelated earlier step. lexiftool hasTerm::ReadKeybuilt in, so nothing is searched, and Lua's own file reads and writes clearerrno, so it exits with 255, the status of adiewithout$!.
Where the Perl original has an obvious bug, lexiftool does what the code evidently means instead of reproducing the bug. The ported line keeps the upstream line recognizable and names the bug in a comment.
- 7z archives, file attributes (
7Z.pm,ReadFilesInfo, attributes property): exiftool reads the attributes' "external" byte from the outer header stream instead of the property's own data, so it sees the id of the property that follows. Where that is not the end marker, it callsReadUINT64, which7Z.pmdoes not define (its reader isReadUInt64), and dies withUndefined subroutine &Image::ExifTool::7Z::ReadUINT64. lexiftool reads the byte from the property data, as the 7z format defines it, and lists the archive's files. Archives that 7-Zip writes put the attributes last and give the same output in both; only an archive with another property after the attributes differs.
Where exiftool's output depends on a bug of the Perl interpreter itself, lexiftool behaves as Perl does without the bug.
POSIX::strftimein Perl 5.42.0 (Perl issue GH #22351): that release defaultsstrftime'sisdstargument to 0 instead of -1, so it normalizes the date without asking the C library whether daylight saving time applies. On a platform whosestruct tmhas notm_gmtoff/tm_zone-- Windows --%Zthen gives the standard-time name for every date (ESTfor a summer date underTimeZone=EST5EDT, and%zthe standard offset). Other releases run the C library'smktimewithisdst-1 and give the daylight-time name for a date in daylight saving time; lexiftool does the same on every Perl. Elsewhere Perl 5.42.0 still takes%Zfrommktime, so only Windows shows the difference.
- The
lexiftoollauncher sets its own module paths for the Lua version it runs on: it ignores entries of another Lua version's rock tree (as an unversionedLUA_PATH/LUA_CPATHset up for Lua 5.1 brings in) and adds~/.luarocks,/usr/localand/usrfor its own version. A versionedLUA_PATH_5_5/LUA_CPATH_5_5still takes precedence. - When the script has a source tree next to it (
src/lexiftool/main.lua), that tree is searched first, so./lexiftoolin a checkout runs the checkout even if a lexiftool is also installed in a system or rock tree.