exiftool-vendored.exe 12.80.0 → 12.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bin/exiftool.exe +0 -0
- package/bin/exiftool_files/Changes +44 -0
- package/bin/exiftool_files/Licenses_Strawberry_Perl.zip +0 -0
- package/bin/exiftool_files/README +3 -2
- package/bin/exiftool_files/exiftool.pl +36 -14
- package/bin/exiftool_files/lib/Archive/Zip/Archive.pm +399 -65
- package/bin/exiftool_files/lib/Archive/Zip/DirectoryMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/FileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/Member.pm +499 -195
- package/bin/exiftool_files/lib/Archive/Zip/NewFileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/StringMember.pm +2 -2
- package/bin/exiftool_files/lib/Archive/Zip/ZipFileMember.pm +79 -20
- package/bin/exiftool_files/lib/Archive/Zip.pm +179 -29
- package/bin/exiftool_files/lib/AutoLoader.pm +453 -0
- package/bin/exiftool_files/lib/B/Deparse.pm +209 -137
- package/bin/exiftool_files/lib/B.pm +1 -1
- package/bin/exiftool_files/lib/Benchmark.pm +1123 -0
- package/bin/exiftool_files/lib/Class/Struct.pm +2 -2
- package/bin/exiftool_files/lib/Compress/Raw/Bzip2.pm +14 -9
- package/bin/exiftool_files/lib/Compress/Raw/Lzma.pm +982 -0
- package/bin/exiftool_files/lib/Compress/Raw/Zlib.pm +91 -86
- package/bin/exiftool_files/lib/Compress/Zlib.pm +105 -100
- package/bin/exiftool_files/lib/Config.pm +9 -9
- package/bin/exiftool_files/lib/Config_heavy.pl +36 -33
- package/bin/exiftool_files/lib/CryptX.pm +2 -82
- package/bin/exiftool_files/lib/Data/Dumper.pm +2 -2
- package/bin/exiftool_files/lib/Digest/MD5.pm +12 -9
- package/bin/exiftool_files/lib/Digest/Perl/MD5.pm +1 -191
- package/bin/exiftool_files/lib/Digest/base.pm +26 -20
- package/bin/exiftool_files/lib/DynaLoader.pm +7 -4
- package/bin/exiftool_files/lib/Encode.pm +3 -3
- package/bin/exiftool_files/lib/Errno.pm +13 -13
- package/bin/exiftool_files/lib/Exporter/Heavy.pm +2 -2
- package/bin/exiftool_files/lib/Exporter.pm +1 -1
- package/bin/exiftool_files/lib/ExtUtils/Command/MM.pm +323 -0
- package/bin/exiftool_files/lib/ExtUtils/Command.pm +382 -0
- package/bin/exiftool_files/lib/File/Find.pm +1 -1
- package/bin/exiftool_files/lib/File/Glob.pm +1 -8
- package/bin/exiftool_files/lib/File/GlobMapper.pm +2 -2
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Carbon.pm +2 -40
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Cocoa.pm +2 -34
- package/bin/exiftool_files/lib/File/HomeDir/Darwin.pm +2 -28
- package/bin/exiftool_files/lib/File/HomeDir/Driver.pm +2 -35
- package/bin/exiftool_files/lib/File/HomeDir/FreeDesktop.pm +2 -62
- package/bin/exiftool_files/lib/File/HomeDir/MacOS9.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Test.pm +2 -43
- package/bin/exiftool_files/lib/File/HomeDir/Unix.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Windows.pm +2 -69
- package/bin/exiftool_files/lib/File/HomeDir.pm +5 -416
- package/bin/exiftool_files/lib/File/Path.pm +3 -3
- package/bin/exiftool_files/lib/File/Spec/Win32.pm +2 -2
- package/bin/exiftool_files/lib/File/Temp.pm +70 -35
- package/bin/exiftool_files/lib/File/Which.pm +1 -240
- package/bin/exiftool_files/lib/File/stat.pm +3 -2
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Bzip2.pm +16 -17
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Deflate.pm +19 -20
- package/bin/exiftool_files/lib/IO/Compress/Base/Common.pm +5 -5
- package/bin/exiftool_files/lib/IO/Compress/Base.pm +35 -26
- package/bin/exiftool_files/lib/IO/Compress/Brotli.pm +159 -0
- package/bin/exiftool_files/lib/IO/Compress/Bzip2.pm +50 -25
- package/bin/exiftool_files/lib/IO/Compress/Gzip/Constants.pm +6 -6
- package/bin/exiftool_files/lib/IO/Compress/Gzip.pm +58 -32
- package/bin/exiftool_files/lib/IO/Compress/RawDeflate.pm +63 -38
- package/bin/exiftool_files/lib/IO/Compress/Zlib/Extra.pm +20 -20
- package/bin/exiftool_files/lib/IO/Dir.pm +1 -1
- package/bin/exiftool_files/lib/IO/File.pm +1 -1
- package/bin/exiftool_files/lib/IO/Handle.pm +1 -21
- package/bin/exiftool_files/lib/IO/Pipe.pm +1 -1
- package/bin/exiftool_files/lib/IO/Seekable.pm +1 -1
- package/bin/exiftool_files/lib/IO/Select.pm +16 -2
- package/bin/exiftool_files/lib/IO/Socket/INET.pm +14 -9
- package/bin/exiftool_files/lib/IO/Socket/UNIX.pm +17 -1
- package/bin/exiftool_files/lib/IO/Socket.pm +474 -126
- package/bin/exiftool_files/lib/IO/String.pm +425 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Adapter/Inflate.pm +13 -14
- package/bin/exiftool_files/lib/IO/Uncompress/Base.pm +142 -132
- package/bin/exiftool_files/lib/IO/Uncompress/Brotli.pm +119 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Gunzip.pm +43 -37
- package/bin/exiftool_files/lib/IO/Uncompress/RawInflate.pm +49 -43
- package/bin/exiftool_files/lib/IO.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +44 -31
- package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +20 -7
- package/bin/exiftool_files/lib/Image/ExifTool/GM.pm +543 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.pm +332 -149
- package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +9 -4
- package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +32 -4
- package/bin/exiftool_files/lib/Image/ExifTool/MakerNotes.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/Microsoft.pm +1 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +331 -22
- package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +55 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +1 -0
- package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +21 -3
- package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +3 -3
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +40 -24
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +61 -30
- package/bin/exiftool_files/lib/Image/ExifTool/README +2 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +1 -1
- package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +4815 -4775
- package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +931 -617
- package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +30 -8
- package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +10 -4
- package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +4 -2
- package/bin/exiftool_files/lib/Image/ExifTool.pm +77 -41
- package/bin/exiftool_files/lib/Image/ExifTool.pod +24 -11
- package/bin/exiftool_files/lib/List/Util.pm +97 -8
- package/bin/exiftool_files/lib/MIME/Base64.pm +5 -5
- package/bin/exiftool_files/lib/MIME/Charset/_Compat.pm +106 -0
- package/bin/exiftool_files/lib/MIME/Charset.pm +1303 -0
- package/bin/exiftool_files/lib/Math/BigFloat.pm +444 -27
- package/bin/exiftool_files/lib/Math/BigInt/Calc.pm +296 -313
- package/bin/exiftool_files/lib/Math/BigInt/FastCalc.pm +1 -1
- package/bin/exiftool_files/lib/Math/BigInt/GMP.pm +2 -115
- package/bin/exiftool_files/lib/Math/BigInt/LTM.pm +2 -24
- package/bin/exiftool_files/lib/Math/BigInt/Lib.pm +61 -32
- package/bin/exiftool_files/lib/Math/BigInt.pm +292 -107
- package/bin/exiftool_files/lib/POSIX.pm +1 -1
- package/bin/exiftool_files/lib/PerlIO/scalar.pm +41 -0
- package/bin/exiftool_files/lib/PerlIO.pm +397 -0
- package/bin/exiftool_files/lib/Portable/CPAN.pm +94 -94
- package/bin/exiftool_files/lib/Portable/Config.pm +94 -94
- package/bin/exiftool_files/lib/Portable/FileSpec.pm +180 -180
- package/bin/exiftool_files/lib/Portable/HomeDir.pm +110 -110
- package/bin/exiftool_files/lib/Portable/LoadYaml.pm +430 -430
- package/bin/exiftool_files/lib/Portable/minicpan.pm +55 -55
- package/bin/exiftool_files/lib/Portable.pm +246 -320
- package/bin/exiftool_files/lib/Scalar/Util.pm +9 -4
- package/bin/exiftool_files/lib/Socket.pm +16 -12
- package/bin/exiftool_files/lib/Storable.pm +1444 -1441
- package/bin/exiftool_files/lib/TAP/Base.pm +133 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Base.pm +467 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Color.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/ParallelSession.pm +201 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/Session.pm +205 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File/Session.pm +95 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File.pm +56 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Session.pm +220 -0
- package/bin/exiftool_files/lib/TAP/Harness/Beyond.pod +426 -0
- package/bin/exiftool_files/lib/TAP/Harness/Env.pm +215 -0
- package/bin/exiftool_files/lib/TAP/Harness.pm +1054 -0
- package/bin/exiftool_files/lib/TAP/Object.pm +155 -0
- package/bin/exiftool_files/lib/TAP/Parser/Aggregator.pm +414 -0
- package/bin/exiftool_files/lib/TAP/Parser/Grammar.pm +584 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Array.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Process.pm +378 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Stream.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator.pm +162 -0
- package/bin/exiftool_files/lib/TAP/Parser/IteratorFactory.pm +339 -0
- package/bin/exiftool_files/lib/TAP/Parser/Multiplexer.pm +194 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Bailout.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Comment.pm +60 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Plan.pm +119 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Pragma.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Test.pm +271 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Unknown.pm +48 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Version.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/YAML.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result.pm +297 -0
- package/bin/exiftool_files/lib/TAP/Parser/ResultFactory.pm +183 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Job.pm +127 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Spinner.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler.pm +448 -0
- package/bin/exiftool_files/lib/TAP/Parser/Source.pm +381 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Executable.pm +184 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/File.pm +136 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Handle.pm +124 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Perl.pm +370 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/RawTAP.pm +130 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler.pm +191 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Reader.pm +332 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Writer.pm +254 -0
- package/bin/exiftool_files/lib/TAP/Parser.pm +1931 -0
- package/bin/exiftool_files/lib/Test/Builder/Formatter.pm +107 -0
- package/bin/exiftool_files/lib/Test/Builder/IO/Scalar.pm +659 -0
- package/bin/exiftool_files/lib/Test/Builder/Module.pm +182 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester/Color.pm +51 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester.pm +675 -0
- package/bin/exiftool_files/lib/Test/Builder/TodoDiag.pm +68 -0
- package/bin/exiftool_files/lib/Test/Builder.pm +2653 -0
- package/bin/exiftool_files/lib/Test/Harness.pm +618 -0
- package/bin/exiftool_files/lib/Test/More.pm +1997 -0
- package/bin/exiftool_files/lib/Test/Simple.pm +220 -0
- package/bin/exiftool_files/lib/Test/Tester/Capture.pm +241 -0
- package/bin/exiftool_files/lib/Test/Tester/CaptureRunner.pm +79 -0
- package/bin/exiftool_files/lib/Test/Tester/Delegate.pm +45 -0
- package/bin/exiftool_files/lib/Test/Tester.pm +695 -0
- package/bin/exiftool_files/lib/Test/Tutorial.pod +618 -0
- package/bin/exiftool_files/lib/Test/use/ok.pm +64 -0
- package/bin/exiftool_files/lib/Text/ParseWords.pm +303 -0
- package/bin/exiftool_files/lib/Tie/StdHandle.pm +2 -2
- package/bin/exiftool_files/lib/Time/HiRes.pm +73 -68
- package/bin/exiftool_files/lib/Time/Local.pm +82 -35
- package/bin/exiftool_files/lib/Time/Piece.pm +19 -4
- package/bin/exiftool_files/lib/Time/Seconds.pm +1 -1
- package/bin/exiftool_files/lib/UNIVERSAL.pm +203 -0
- package/bin/exiftool_files/lib/Unicode/GCString.pm +60 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak/Constants.pm +68 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak.pm +248 -0
- package/bin/exiftool_files/lib/Win32/API/Struct.pm +1 -177
- package/bin/exiftool_files/lib/Win32/API/Type.pm +1 -100
- package/bin/exiftool_files/lib/Win32/API.pm +1 -830
- package/bin/exiftool_files/lib/Win32/FindFile.pm +2 -123
- package/bin/exiftool_files/lib/Win32.pm +213 -89
- package/bin/exiftool_files/lib/Win32API/File.pm +1 -1
- package/bin/exiftool_files/lib/auto/B/B.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Bzip2/Bzip2.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/Lzma.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/autosplit.ix +3 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Zlib/Zlib.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/CryptX/CryptX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Cwd/Cwd.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Data/Dumper/Dumper.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/MD5/MD5.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/SHA/SHA.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Encode/Encode.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Fcntl/Fcntl.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/File/Glob/Glob.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/Compress/Brotli/Brotli.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/IO.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/List/Util/Util.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/MIME/Base64/Base64.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/FastCalc/FastCalc.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/GMP/GMP.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/POSIX/POSIX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/PerlIO/scalar/scalar.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Socket/Socket.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Storable/Storable.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/HiRes/HiRes.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/Piece/Piece.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Unicode/LineBreak/LineBreak.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/API/API.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/FindFile/FindFile.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/Win32.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32API/File/File.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/mro/mro.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/re/re.xs.dll +0 -0
- package/bin/exiftool_files/lib/feature.pm +49 -17
- package/bin/exiftool_files/lib/mro.pm +4 -20
- package/bin/exiftool_files/lib/overload.pm +15 -15
- package/bin/exiftool_files/lib/parent.pm +10 -2
- package/bin/exiftool_files/lib/re.pm +91 -33
- package/bin/exiftool_files/lib/warnings.pm +17 -6
- package/bin/exiftool_files/libgcc_s_seh-1.dll +0 -0
- package/bin/exiftool_files/liblzma-5__.dll +0 -0
- package/bin/exiftool_files/libstdc++-6.dll +0 -0
- package/bin/exiftool_files/libwinpthread-1.dll +0 -0
- package/bin/exiftool_files/perl.exe +0 -0
- package/bin/exiftool_files/perl532.dll +0 -0
- package/package.json +7 -5
- package/bin/exiftool_files/libgcc_s_dw2-1.dll +0 -0
- package/bin/exiftool_files/perl530.dll +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
package File::Temp; # git description: v0.
|
|
1
|
+
package File::Temp; # git description: v0.2310-3-gc7148fe
|
|
2
2
|
# ABSTRACT: return name and handle of a temporary file safely
|
|
3
3
|
|
|
4
|
-
our $VERSION = '0.
|
|
4
|
+
our $VERSION = '0.2311';
|
|
5
5
|
|
|
6
6
|
#pod =begin :__INTERNALS
|
|
7
7
|
#pod
|
|
@@ -307,6 +307,7 @@ my %FILES_CREATED_BY_OBJECT;
|
|
|
307
307
|
# use of the O_TEMPORARY flag to sysopen.
|
|
308
308
|
# Usually irrelevant on unix
|
|
309
309
|
# "use_exlock" => Indicates that O_EXLOCK should be used. Default is false.
|
|
310
|
+
# "file_permissions" => file permissions for sysopen(). Default is 0600.
|
|
310
311
|
|
|
311
312
|
# Optionally a reference to a scalar can be passed into the function
|
|
312
313
|
# On error this will be used to store the reason for the error
|
|
@@ -339,12 +340,13 @@ sub _gettemp {
|
|
|
339
340
|
|
|
340
341
|
# Default options
|
|
341
342
|
my %options = (
|
|
342
|
-
"open"
|
|
343
|
-
"mkdir"
|
|
344
|
-
"suffixlen"
|
|
345
|
-
"unlink_on_close"
|
|
346
|
-
"use_exlock"
|
|
347
|
-
"ErrStr"
|
|
343
|
+
"open" => 0,
|
|
344
|
+
"mkdir" => 0,
|
|
345
|
+
"suffixlen" => 0,
|
|
346
|
+
"unlink_on_close" => 0,
|
|
347
|
+
"use_exlock" => 0,
|
|
348
|
+
"ErrStr" => \$tempErrStr,
|
|
349
|
+
"file_permissions" => undef,
|
|
348
350
|
);
|
|
349
351
|
|
|
350
352
|
# Read the template
|
|
@@ -480,6 +482,9 @@ sub _gettemp {
|
|
|
480
482
|
}
|
|
481
483
|
}
|
|
482
484
|
|
|
485
|
+
my $perms = $options{file_permissions};
|
|
486
|
+
my $has_perms = defined $perms;
|
|
487
|
+
$perms = 0600 unless $has_perms;
|
|
483
488
|
|
|
484
489
|
# Now try MAX_TRIES time to open the file
|
|
485
490
|
for (my $i = 0; $i < MAX_TRIES; $i++) {
|
|
@@ -502,19 +507,19 @@ sub _gettemp {
|
|
|
502
507
|
my $open_success = undef;
|
|
503
508
|
if ( $^O eq 'VMS' and $options{"unlink_on_close"} && !$KEEP_ALL) {
|
|
504
509
|
# make it auto delete on close by setting FAB$V_DLT bit
|
|
505
|
-
$fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS,
|
|
510
|
+
$fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS, $perms, 'fop=dlt');
|
|
506
511
|
$open_success = $fh;
|
|
507
512
|
} else {
|
|
508
513
|
my $flags = ( ($options{"unlink_on_close"} && !$KEEP_ALL) ?
|
|
509
514
|
$OPENTEMPFLAGS :
|
|
510
515
|
$OPENFLAGS );
|
|
511
516
|
$flags |= $LOCKFLAG if (defined $LOCKFLAG && $options{use_exlock});
|
|
512
|
-
$open_success = sysopen($fh, $path, $flags,
|
|
517
|
+
$open_success = sysopen($fh, $path, $flags, $perms);
|
|
513
518
|
}
|
|
514
519
|
if ( $open_success ) {
|
|
515
520
|
|
|
516
521
|
# in case of odd umask force rw
|
|
517
|
-
chmod(
|
|
522
|
+
chmod($perms, $path) unless $has_perms;
|
|
518
523
|
|
|
519
524
|
# Opened successfully - return file handle and name
|
|
520
525
|
return ($fh, $path);
|
|
@@ -799,7 +804,7 @@ sub _is_verysafe {
|
|
|
799
804
|
|
|
800
805
|
sub _can_unlink_opened_file {
|
|
801
806
|
|
|
802
|
-
if (grep
|
|
807
|
+
if (grep $^O eq $_, qw/MSWin32 os2 VMS dos MacOS haiku/) {
|
|
803
808
|
return 0;
|
|
804
809
|
} else {
|
|
805
810
|
return 1;
|
|
@@ -999,7 +1004,7 @@ sub _can_do_level {
|
|
|
999
1004
|
sub _parse_args {
|
|
1000
1005
|
my $leading_template = (scalar(@_) % 2 == 1 ? shift(@_) : '' );
|
|
1001
1006
|
my %args = @_;
|
|
1002
|
-
%args = map
|
|
1007
|
+
%args = map +(uc($_) => $args{$_}), keys %args;
|
|
1003
1008
|
|
|
1004
1009
|
# template (store it in an array so that it will
|
|
1005
1010
|
# disappear from the arg list of tempfile)
|
|
@@ -1048,7 +1053,8 @@ sub _parse_args {
|
|
|
1048
1053
|
#pod if UNLINK is set to true (the default).
|
|
1049
1054
|
#pod
|
|
1050
1055
|
#pod Supported arguments are the same as for C<tempfile>: UNLINK
|
|
1051
|
-
#pod (defaulting to true), DIR, EXLOCK and SUFFIX.
|
|
1056
|
+
#pod (defaulting to true), DIR, EXLOCK, PERMS and SUFFIX.
|
|
1057
|
+
#pod Additionally, the filename
|
|
1052
1058
|
#pod template is specified using the TEMPLATE option. The OPEN option
|
|
1053
1059
|
#pod is not supported (the file is always opened).
|
|
1054
1060
|
#pod
|
|
@@ -1359,6 +1365,11 @@ sub DESTROY {
|
|
|
1359
1365
|
#pod
|
|
1360
1366
|
#pod ($fh, $filename) = tempfile($template, EXLOCK => 1);
|
|
1361
1367
|
#pod
|
|
1368
|
+
#pod By default, the temp file is created with 0600 file permissions.
|
|
1369
|
+
#pod Use C<PERMS> to change this:
|
|
1370
|
+
#pod
|
|
1371
|
+
#pod ($fh, $filename) = tempfile($template, PERMS => 0666);
|
|
1372
|
+
#pod
|
|
1362
1373
|
#pod Options can be combined as required.
|
|
1363
1374
|
#pod
|
|
1364
1375
|
#pod Will croak() if there is an error.
|
|
@@ -1371,6 +1382,8 @@ sub DESTROY {
|
|
|
1371
1382
|
#pod
|
|
1372
1383
|
#pod EXLOCK flag available since 0.19.
|
|
1373
1384
|
#pod
|
|
1385
|
+
#pod PERMS flag available since 0.2310.
|
|
1386
|
+
#pod
|
|
1374
1387
|
#pod =cut
|
|
1375
1388
|
|
|
1376
1389
|
sub tempfile {
|
|
@@ -1386,8 +1399,9 @@ sub tempfile {
|
|
|
1386
1399
|
"SUFFIX" => '', # Template suffix
|
|
1387
1400
|
"UNLINK" => 0, # Do not unlink file on exit
|
|
1388
1401
|
"OPEN" => 1, # Open file
|
|
1389
|
-
"TMPDIR" => 0,
|
|
1390
|
-
"EXLOCK" => 0,
|
|
1402
|
+
"TMPDIR" => 0, # Place tempfile in tempdir if template specified
|
|
1403
|
+
"EXLOCK" => 0, # Open file with O_EXLOCK
|
|
1404
|
+
"PERMS" => undef, # File permissions
|
|
1391
1405
|
);
|
|
1392
1406
|
|
|
1393
1407
|
# Check to see whether we have an odd or even number of arguments
|
|
@@ -1464,12 +1478,13 @@ sub tempfile {
|
|
|
1464
1478
|
my ($fh, $path, $errstr);
|
|
1465
1479
|
croak "Error in tempfile() using template $template: $errstr"
|
|
1466
1480
|
unless (($fh, $path) = _gettemp($template,
|
|
1467
|
-
"open"
|
|
1468
|
-
"mkdir"=> 0
|
|
1469
|
-
"unlink_on_close"
|
|
1470
|
-
"suffixlen"
|
|
1471
|
-
"ErrStr"
|
|
1472
|
-
"use_exlock"
|
|
1481
|
+
"open" => $options{OPEN},
|
|
1482
|
+
"mkdir" => 0,
|
|
1483
|
+
"unlink_on_close" => $unlink_on_close,
|
|
1484
|
+
"suffixlen" => length($options{SUFFIX}),
|
|
1485
|
+
"ErrStr" => \$errstr,
|
|
1486
|
+
"use_exlock" => $options{EXLOCK},
|
|
1487
|
+
"file_permissions" => $options{PERMS},
|
|
1473
1488
|
) );
|
|
1474
1489
|
|
|
1475
1490
|
# Set up an exit handler that can do whatever is right for the
|
|
@@ -2581,7 +2596,7 @@ sub unlink1 {
|
|
|
2581
2596
|
package ## hide from PAUSE
|
|
2582
2597
|
File::Temp::Dir;
|
|
2583
2598
|
|
|
2584
|
-
our $VERSION = '0.
|
|
2599
|
+
our $VERSION = '0.2311';
|
|
2585
2600
|
|
|
2586
2601
|
use File::Path qw/ rmtree /;
|
|
2587
2602
|
use strict;
|
|
@@ -2648,7 +2663,7 @@ File::Temp - return name and handle of a temporary file safely
|
|
|
2648
2663
|
|
|
2649
2664
|
=head1 VERSION
|
|
2650
2665
|
|
|
2651
|
-
version 0.
|
|
2666
|
+
version 0.2311
|
|
2652
2667
|
|
|
2653
2668
|
=head1 SYNOPSIS
|
|
2654
2669
|
|
|
@@ -2819,7 +2834,8 @@ that the temporary file is removed by the object destructor
|
|
|
2819
2834
|
if UNLINK is set to true (the default).
|
|
2820
2835
|
|
|
2821
2836
|
Supported arguments are the same as for C<tempfile>: UNLINK
|
|
2822
|
-
(defaulting to true), DIR, EXLOCK and SUFFIX.
|
|
2837
|
+
(defaulting to true), DIR, EXLOCK, PERMS and SUFFIX.
|
|
2838
|
+
Additionally, the filename
|
|
2823
2839
|
template is specified using the TEMPLATE option. The OPEN option
|
|
2824
2840
|
is not supported (the file is always opened).
|
|
2825
2841
|
|
|
@@ -3004,6 +3020,11 @@ versions, explicitly set C<< EXLOCK=>0 >>.
|
|
|
3004
3020
|
|
|
3005
3021
|
($fh, $filename) = tempfile($template, EXLOCK => 1);
|
|
3006
3022
|
|
|
3023
|
+
By default, the temp file is created with 0600 file permissions.
|
|
3024
|
+
Use C<PERMS> to change this:
|
|
3025
|
+
|
|
3026
|
+
($fh, $filename) = tempfile($template, PERMS => 0666);
|
|
3027
|
+
|
|
3007
3028
|
Options can be combined as required.
|
|
3008
3029
|
|
|
3009
3030
|
Will croak() if there is an error.
|
|
@@ -3016,6 +3037,8 @@ TMPDIR flag available since 0.19.
|
|
|
3016
3037
|
|
|
3017
3038
|
EXLOCK flag available since 0.19.
|
|
3018
3039
|
|
|
3040
|
+
PERMS flag available since 0.2310.
|
|
3041
|
+
|
|
3019
3042
|
=item B<tempdir>
|
|
3020
3043
|
|
|
3021
3044
|
This is the recommended interface for creation of temporary
|
|
@@ -3606,13 +3629,13 @@ Tim Jenness <tjenness@cpan.org>
|
|
|
3606
3629
|
|
|
3607
3630
|
=head1 CONTRIBUTORS
|
|
3608
3631
|
|
|
3609
|
-
=for stopwords
|
|
3632
|
+
=for stopwords Tim Jenness Karen Etheridge David Golden Slaven Rezic mohawk2 Roy Ivy III Peter Rabbitson Olivier Mengué John Acklam Gim Yee Nicolas R Brian Mowrey Dagfinn Ilmari Mannsåker Steinbrunner Ed Avis Guillem Jover James E. Keenan Kevin Ryde Ben Tilly
|
|
3610
3633
|
|
|
3611
3634
|
=over 4
|
|
3612
3635
|
|
|
3613
3636
|
=item *
|
|
3614
3637
|
|
|
3615
|
-
|
|
3638
|
+
Tim Jenness <t.jenness@jach.hawaii.edu>
|
|
3616
3639
|
|
|
3617
3640
|
=item *
|
|
3618
3641
|
|
|
@@ -3620,23 +3643,27 @@ Karen Etheridge <ether@cpan.org>
|
|
|
3620
3643
|
|
|
3621
3644
|
=item *
|
|
3622
3645
|
|
|
3623
|
-
|
|
3646
|
+
David Golden <dagolden@cpan.org>
|
|
3624
3647
|
|
|
3625
3648
|
=item *
|
|
3626
3649
|
|
|
3627
|
-
|
|
3650
|
+
Slaven Rezic <srezic@cpan.org>
|
|
3628
3651
|
|
|
3629
3652
|
=item *
|
|
3630
3653
|
|
|
3631
|
-
|
|
3654
|
+
mohawk2 <mohawk2@users.noreply.github.com>
|
|
3632
3655
|
|
|
3633
3656
|
=item *
|
|
3634
3657
|
|
|
3635
|
-
|
|
3658
|
+
Roy Ivy III <rivy.dev@gmail.com>
|
|
3636
3659
|
|
|
3637
3660
|
=item *
|
|
3638
3661
|
|
|
3639
|
-
|
|
3662
|
+
Peter Rabbitson <ribasushi@cpan.org>
|
|
3663
|
+
|
|
3664
|
+
=item *
|
|
3665
|
+
|
|
3666
|
+
Olivier Mengué <dolmen@cpan.org>
|
|
3640
3667
|
|
|
3641
3668
|
=item *
|
|
3642
3669
|
|
|
@@ -3644,11 +3671,11 @@ Peter John Acklam <pjacklam@online.no>
|
|
|
3644
3671
|
|
|
3645
3672
|
=item *
|
|
3646
3673
|
|
|
3647
|
-
|
|
3674
|
+
Tim Gim Yee <tim.gim.yee@gmail.com>
|
|
3648
3675
|
|
|
3649
3676
|
=item *
|
|
3650
3677
|
|
|
3651
|
-
|
|
3678
|
+
Nicolas R <atoomic@cpan.org>
|
|
3652
3679
|
|
|
3653
3680
|
=item *
|
|
3654
3681
|
|
|
@@ -3672,13 +3699,21 @@ Guillem Jover <guillem@hadrons.org>
|
|
|
3672
3699
|
|
|
3673
3700
|
=item *
|
|
3674
3701
|
|
|
3702
|
+
James E. Keenan <jkeen@verizon.net>
|
|
3703
|
+
|
|
3704
|
+
=item *
|
|
3705
|
+
|
|
3706
|
+
Kevin Ryde <user42@zip.com.au>
|
|
3707
|
+
|
|
3708
|
+
=item *
|
|
3709
|
+
|
|
3675
3710
|
Ben Tilly <btilly@gmail.com>
|
|
3676
3711
|
|
|
3677
3712
|
=back
|
|
3678
3713
|
|
|
3679
3714
|
=head1 COPYRIGHT AND LICENSE
|
|
3680
3715
|
|
|
3681
|
-
This software is copyright (c)
|
|
3716
|
+
This software is copyright (c) 2020 by Tim Jenness and the UK Particle Physics and Astronomy Research Council.
|
|
3682
3717
|
|
|
3683
3718
|
This is free software; you can redistribute it and/or modify it under
|
|
3684
3719
|
the same terms as the Perl 5 programming language system itself.
|
|
@@ -150,243 +150,4 @@ sub where {
|
|
|
150
150
|
|
|
151
151
|
__END__
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
=encoding UTF-8
|
|
156
|
-
|
|
157
|
-
=head1 NAME
|
|
158
|
-
|
|
159
|
-
File::Which - Perl implementation of the which utility as an API
|
|
160
|
-
|
|
161
|
-
=head1 VERSION
|
|
162
|
-
|
|
163
|
-
version 1.23
|
|
164
|
-
|
|
165
|
-
=head1 SYNOPSIS
|
|
166
|
-
|
|
167
|
-
use File::Which; # exports which()
|
|
168
|
-
use File::Which qw(which where); # exports which() and where()
|
|
169
|
-
|
|
170
|
-
my $exe_path = which 'perldoc';
|
|
171
|
-
|
|
172
|
-
my @paths = where 'perl';
|
|
173
|
-
# Or
|
|
174
|
-
my @paths = which 'perl'; # an array forces search for all of them
|
|
175
|
-
|
|
176
|
-
=head1 DESCRIPTION
|
|
177
|
-
|
|
178
|
-
L<File::Which> finds the full or relative paths to executable programs on
|
|
179
|
-
the system. This is normally the function of C<which> utility. C<which> is
|
|
180
|
-
typically implemented as either a program or a built in shell command. On
|
|
181
|
-
some platforms, such as Microsoft Windows it is not provided as part of the
|
|
182
|
-
core operating system. This module provides a consistent API to this
|
|
183
|
-
functionality regardless of the underlying platform.
|
|
184
|
-
|
|
185
|
-
The focus of this module is correctness and portability. As a consequence
|
|
186
|
-
platforms where the current directory is implicitly part of the search path
|
|
187
|
-
such as Microsoft Windows will find executables in the current directory,
|
|
188
|
-
whereas on platforms such as UNIX where this is not the case executables
|
|
189
|
-
in the current directory will only be found if the current directory is
|
|
190
|
-
explicitly added to the path.
|
|
191
|
-
|
|
192
|
-
If you need a portable C<which> on the command line in an environment that
|
|
193
|
-
does not provide it, install L<App::pwhich> which provides a command line
|
|
194
|
-
interface to this API.
|
|
195
|
-
|
|
196
|
-
=head2 Implementations
|
|
197
|
-
|
|
198
|
-
L<File::Which> searches the directories of the user's C<PATH> (the current
|
|
199
|
-
implementation uses L<File::Spec#path> to determine the correct C<PATH>),
|
|
200
|
-
looking for executable files having the name specified as a parameter to
|
|
201
|
-
L</which>. Under Win32 systems, which do not have a notion of directly
|
|
202
|
-
executable files, but uses special extensions such as C<.exe> and C<.bat>
|
|
203
|
-
to identify them, C<File::Which> takes extra steps to assure that
|
|
204
|
-
you will find the correct file (so for example, you might be searching for
|
|
205
|
-
C<perl>, it'll try F<perl.exe>, F<perl.bat>, etc.)
|
|
206
|
-
|
|
207
|
-
=head3 Linux, *BSD and other UNIXes
|
|
208
|
-
|
|
209
|
-
There should not be any surprises here. The current directory will not be
|
|
210
|
-
searched unless it is explicitly added to the path.
|
|
211
|
-
|
|
212
|
-
=head3 Modern Windows (including NT, XP, Vista, 7, 8, 10 etc)
|
|
213
|
-
|
|
214
|
-
Windows NT has a special environment variable called C<PATHEXT>, which is used
|
|
215
|
-
by the shell to look for executable files. Usually, it will contain a list in
|
|
216
|
-
the form C<.EXE;.BAT;.COM;.JS;.VBS> etc. If C<File::Which> finds such an
|
|
217
|
-
environment variable, it parses the list and uses it as the different
|
|
218
|
-
extensions.
|
|
219
|
-
|
|
220
|
-
=head3 Cygwin
|
|
221
|
-
|
|
222
|
-
Cygwin provides a Unix-like environment for Microsoft Windows users. In most
|
|
223
|
-
ways it works like other Unix and Unix-like environments, but in a few key
|
|
224
|
-
aspects it works like Windows. As with other Unix environments, the current
|
|
225
|
-
directory is not included in the search unless it is explicitly included in
|
|
226
|
-
the search path. Like on Windows, files with C<.EXE> or <.BAT> extensions will
|
|
227
|
-
be discovered even if they are not part of the query. C<.COM> or extensions
|
|
228
|
-
specified using the C<PATHEXT> environment variable will NOT be discovered
|
|
229
|
-
without the fully qualified name, however.
|
|
230
|
-
|
|
231
|
-
=head3 Windows ME, 98, 95, MS-DOS, OS/2
|
|
232
|
-
|
|
233
|
-
This set of operating systems don't have the C<PATHEXT> variable, and usually
|
|
234
|
-
you will find executable files there with the extensions C<.exe>, C<.bat> and
|
|
235
|
-
(less likely) C<.com>. C<File::Which> uses this hardcoded list if it's running
|
|
236
|
-
under Win32 but does not find a C<PATHEXT> variable.
|
|
237
|
-
|
|
238
|
-
As of 2015 none of these platforms are tested frequently (or perhaps ever),
|
|
239
|
-
but the current maintainer is determined not to intentionally remove support
|
|
240
|
-
for older operating systems.
|
|
241
|
-
|
|
242
|
-
=head3 VMS
|
|
243
|
-
|
|
244
|
-
Same case as Windows 9x: uses C<.exe> and C<.com> (in that order).
|
|
245
|
-
|
|
246
|
-
As of 2015 the current maintainer does not test on VMS, and is in fact not
|
|
247
|
-
certain it has ever been tested on VMS. If this platform is important to you
|
|
248
|
-
and you can help me verify and or support it on that platform please contact
|
|
249
|
-
me.
|
|
250
|
-
|
|
251
|
-
=head1 FUNCTIONS
|
|
252
|
-
|
|
253
|
-
=head2 which
|
|
254
|
-
|
|
255
|
-
my $path = which $short_exe_name;
|
|
256
|
-
my @paths = which $short_exe_name;
|
|
257
|
-
|
|
258
|
-
Exported by default.
|
|
259
|
-
|
|
260
|
-
C<$short_exe_name> is the name used in the shell to call the program (for
|
|
261
|
-
example, C<perl>).
|
|
262
|
-
|
|
263
|
-
If it finds an executable with the name you specified, C<which()> will return
|
|
264
|
-
the absolute path leading to this executable (for example, F</usr/bin/perl> or
|
|
265
|
-
F<C:\Perl\Bin\perl.exe>).
|
|
266
|
-
|
|
267
|
-
If it does I<not> find the executable, it returns C<undef>.
|
|
268
|
-
|
|
269
|
-
If C<which()> is called in list context, it will return I<all> the
|
|
270
|
-
matches.
|
|
271
|
-
|
|
272
|
-
=head2 where
|
|
273
|
-
|
|
274
|
-
my @paths = where $short_exe_name;
|
|
275
|
-
|
|
276
|
-
Not exported by default.
|
|
277
|
-
|
|
278
|
-
Same as L</which> in array context. Similar to the C<where> csh
|
|
279
|
-
built-in command or C<which -a> command for platforms that support the
|
|
280
|
-
C<-a> option. Will return an array containing all the path names
|
|
281
|
-
matching C<$short_exe_name>.
|
|
282
|
-
|
|
283
|
-
=head1 GLOBALS
|
|
284
|
-
|
|
285
|
-
=head2 $IMPLICIT_CURRENT_DIR
|
|
286
|
-
|
|
287
|
-
True if the current directory is included in the search implicitly on
|
|
288
|
-
whatever platform you are using. Normally the default is reasonable,
|
|
289
|
-
but on Windows the current directory is included implicitly for older
|
|
290
|
-
shells like C<cmd.exe> and C<command.com>, but not for newer shells
|
|
291
|
-
like PowerShell. If you overrule this default, you should ALWAYS
|
|
292
|
-
localize the variable to the tightest scope possible, since setting
|
|
293
|
-
this variable from a module can affect other modules. Thus on Windows
|
|
294
|
-
you can get the correct result if the user is running either C<cmd.exe>
|
|
295
|
-
or PowerShell on Windows you can do this:
|
|
296
|
-
|
|
297
|
-
use File::Which qw( which );
|
|
298
|
-
use Shell::Guess;
|
|
299
|
-
|
|
300
|
-
my $path = do {
|
|
301
|
-
my $is_power = Shell::Guess->running_shell->is_power;
|
|
302
|
-
local $File::Which::IMPLICIT_CURRENT_DIR = !$is_power;
|
|
303
|
-
which 'foo';
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
For a variety of reasons it is difficult to accurately compute the
|
|
307
|
-
shell that a user is using, but L<Shell::Guess> makes a reasonable
|
|
308
|
-
effort.
|
|
309
|
-
|
|
310
|
-
=head1 CAVEATS
|
|
311
|
-
|
|
312
|
-
This module has no non-core requirements for Perl 5.6.2 and better.
|
|
313
|
-
|
|
314
|
-
This module is fully supported back to Perl 5.8.1. It may work on 5.8.0.
|
|
315
|
-
It should work on Perl 5.6.x and I may even test on 5.6.2. I will accept
|
|
316
|
-
patches to maintain compatibility for such older Perls, but you may
|
|
317
|
-
need to fix it on 5.6.x / 5.8.0 and send me a patch.
|
|
318
|
-
|
|
319
|
-
Not tested on VMS although there is platform specific code
|
|
320
|
-
for those. Anyone who haves a second would be very kind to send me a
|
|
321
|
-
report of how it went.
|
|
322
|
-
|
|
323
|
-
=head1 SUPPORT
|
|
324
|
-
|
|
325
|
-
Bugs should be reported via the GitHub issue tracker
|
|
326
|
-
|
|
327
|
-
L<https://github.com/plicease/File-Which/issues>
|
|
328
|
-
|
|
329
|
-
For other issues, contact the maintainer.
|
|
330
|
-
|
|
331
|
-
=head1 SEE ALSO
|
|
332
|
-
|
|
333
|
-
=over 4
|
|
334
|
-
|
|
335
|
-
=item L<pwhich>, L<App::pwhich>
|
|
336
|
-
|
|
337
|
-
Command line interface to this module.
|
|
338
|
-
|
|
339
|
-
=item L<IPC::Cmd>
|
|
340
|
-
|
|
341
|
-
This module provides (among other things) a C<can_run> function, which is
|
|
342
|
-
similar to C<which>. It is a much heavier module since it does a lot more,
|
|
343
|
-
and if you use C<can_run> it pulls in L<ExtUtils::MakeMaker>. This combination
|
|
344
|
-
may be overkill for applications which do not need L<IPC::Cmd>'s complicated
|
|
345
|
-
interface for running programs, or do not need the memory overhead required
|
|
346
|
-
for installing Perl modules.
|
|
347
|
-
|
|
348
|
-
At least some older versions will find executables in the current directory,
|
|
349
|
-
even if the current directory is not in the search path (which is the default
|
|
350
|
-
on modern Unix).
|
|
351
|
-
|
|
352
|
-
C<can_run> converts directory path name to the 8.3 version on Windows using
|
|
353
|
-
C<Win32::GetShortPathName> in some cases. This is frequently useful for tools
|
|
354
|
-
that just need to run something using C<system> in scalar mode, but may be
|
|
355
|
-
inconvenient for tools like L<App::pwhich> where user readability is a premium.
|
|
356
|
-
Relying on C<Win32::GetShortPathName> to produce filenames without spaces
|
|
357
|
-
is problematic, as 8.3 filenames can be turned off with tweaks to the
|
|
358
|
-
registry (see L<https://technet.microsoft.com/en-us/library/cc959352.aspx>).
|
|
359
|
-
|
|
360
|
-
=item L<Devel::CheckBin>
|
|
361
|
-
|
|
362
|
-
This module purports to "check that a command is available", but does not
|
|
363
|
-
provide any documentation on how you might use it.
|
|
364
|
-
|
|
365
|
-
=back
|
|
366
|
-
|
|
367
|
-
=head1 AUTHORS
|
|
368
|
-
|
|
369
|
-
=over 4
|
|
370
|
-
|
|
371
|
-
=item *
|
|
372
|
-
|
|
373
|
-
Per Einar Ellefsen <pereinar@cpan.org>
|
|
374
|
-
|
|
375
|
-
=item *
|
|
376
|
-
|
|
377
|
-
Adam Kennedy <adamk@cpan.org>
|
|
378
|
-
|
|
379
|
-
=item *
|
|
380
|
-
|
|
381
|
-
Graham Ollis <plicease@cpan.org>
|
|
382
|
-
|
|
383
|
-
=back
|
|
384
|
-
|
|
385
|
-
=head1 COPYRIGHT AND LICENSE
|
|
386
|
-
|
|
387
|
-
This software is copyright (c) 2002 by Per Einar Ellefsen <pereinar@cpan.org>.
|
|
388
|
-
|
|
389
|
-
This is free software; you can redistribute it and/or modify it under
|
|
390
|
-
the same terms as the Perl 5 programming language system itself.
|
|
391
|
-
|
|
392
|
-
=cut
|
|
153
|
+
#line 393
|
|
@@ -5,12 +5,13 @@ use strict;
|
|
|
5
5
|
use warnings;
|
|
6
6
|
use warnings::register;
|
|
7
7
|
use Carp;
|
|
8
|
+
use constant _IS_CYGWIN => $^O eq "cygwin";
|
|
8
9
|
|
|
9
10
|
BEGIN { *warnif = \&warnings::warnif }
|
|
10
11
|
|
|
11
12
|
our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
|
|
12
13
|
|
|
13
|
-
our $VERSION = '1.
|
|
14
|
+
our $VERSION = '1.09';
|
|
14
15
|
|
|
15
16
|
our @fields;
|
|
16
17
|
our ( $st_dev, $st_ino, $st_mode,
|
|
@@ -98,7 +99,7 @@ else {
|
|
|
98
99
|
# This code basically assumes that the rwx bits of the mode are
|
|
99
100
|
# the 0777 bits, but so does Perl_cando.
|
|
100
101
|
|
|
101
|
-
if ($uid == 0 && $^O ne "VMS") {
|
|
102
|
+
if (_IS_CYGWIN ? _ingroup(544, $eff) : ($uid == 0 && $^O ne "VMS")) {
|
|
102
103
|
# If we're root on unix
|
|
103
104
|
# not testing for executable status => all file tests are true
|
|
104
105
|
return 1 if !($mode & 0111);
|
|
@@ -4,12 +4,12 @@ use strict;
|
|
|
4
4
|
use warnings;
|
|
5
5
|
use bytes;
|
|
6
6
|
|
|
7
|
-
use IO::Compress::Base::Common 2.
|
|
7
|
+
use IO::Compress::Base::Common 2.100 qw(:Status);
|
|
8
8
|
|
|
9
|
-
use Compress::Raw::Bzip2 2.
|
|
9
|
+
use Compress::Raw::Bzip2 2.100 ;
|
|
10
10
|
|
|
11
11
|
our ($VERSION);
|
|
12
|
-
$VERSION = '2.
|
|
12
|
+
$VERSION = '2.100';
|
|
13
13
|
|
|
14
14
|
sub mkCompObject
|
|
15
15
|
{
|
|
@@ -21,7 +21,7 @@ sub mkCompObject
|
|
|
21
21
|
$WorkFactor = 0 if ! defined $WorkFactor ;
|
|
22
22
|
$Verbosity = 0 if ! defined $Verbosity ;
|
|
23
23
|
|
|
24
|
-
my ($def, $status) =
|
|
24
|
+
my ($def, $status) = Compress::Raw::Bzip2->new(1, $BlockSize100K,
|
|
25
25
|
$WorkFactor, $Verbosity);
|
|
26
26
|
|
|
27
27
|
return (undef, "Could not create Deflate object: $status", $status)
|
|
@@ -30,7 +30,7 @@ sub mkCompObject
|
|
|
30
30
|
return bless {'Def' => $def,
|
|
31
31
|
'Error' => '',
|
|
32
32
|
'ErrorNo' => 0,
|
|
33
|
-
} ;
|
|
33
|
+
} ;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
sub compr
|
|
@@ -44,11 +44,11 @@ sub compr
|
|
|
44
44
|
|
|
45
45
|
if ($status != BZ_RUN_OK)
|
|
46
46
|
{
|
|
47
|
-
$self->{Error} = "Deflate Error: $status";
|
|
47
|
+
$self->{Error} = "Deflate Error: $status";
|
|
48
48
|
return STATUS_ERROR;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
return STATUS_OK;
|
|
51
|
+
return STATUS_OK;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
sub flush
|
|
@@ -62,12 +62,12 @@ sub flush
|
|
|
62
62
|
|
|
63
63
|
if ($status != BZ_RUN_OK)
|
|
64
64
|
{
|
|
65
|
-
$self->{Error} = "Deflate Error: $status";
|
|
65
|
+
$self->{Error} = "Deflate Error: $status";
|
|
66
66
|
return STATUS_ERROR;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
return STATUS_OK;
|
|
70
|
-
|
|
69
|
+
return STATUS_OK;
|
|
70
|
+
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
sub close
|
|
@@ -81,12 +81,12 @@ sub close
|
|
|
81
81
|
|
|
82
82
|
if ($status != BZ_STREAM_END)
|
|
83
83
|
{
|
|
84
|
-
$self->{Error} = "Deflate Error: $status";
|
|
84
|
+
$self->{Error} = "Deflate Error: $status";
|
|
85
85
|
return STATUS_ERROR;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
return STATUS_OK;
|
|
89
|
-
|
|
88
|
+
return STATUS_OK;
|
|
89
|
+
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
|
|
@@ -96,18 +96,18 @@ sub reset
|
|
|
96
96
|
|
|
97
97
|
my $outer = $self->{Outer};
|
|
98
98
|
|
|
99
|
-
my ($def, $status) =
|
|
99
|
+
my ($def, $status) = Compress::Raw::Bzip2->new();
|
|
100
100
|
$self->{ErrorNo} = ($status == BZ_OK) ? 0 : $status ;
|
|
101
101
|
|
|
102
102
|
if ($status != BZ_OK)
|
|
103
103
|
{
|
|
104
|
-
$self->{Error} = "Cannot create Deflate object: $status";
|
|
104
|
+
$self->{Error} = "Cannot create Deflate object: $status";
|
|
105
105
|
return STATUS_ERROR;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
$self->{Def} = $def;
|
|
109
109
|
|
|
110
|
-
return STATUS_OK;
|
|
110
|
+
return STATUS_OK;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
sub compressedBytes
|
|
@@ -151,4 +151,3 @@ sub uncompressedBytes
|
|
|
151
151
|
1;
|
|
152
152
|
|
|
153
153
|
__END__
|
|
154
|
-
|