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.
Files changed (253) hide show
  1. package/README.md +6 -0
  2. package/bin/exiftool.exe +0 -0
  3. package/bin/exiftool_files/Changes +44 -0
  4. package/bin/exiftool_files/Licenses_Strawberry_Perl.zip +0 -0
  5. package/bin/exiftool_files/README +3 -2
  6. package/bin/exiftool_files/exiftool.pl +36 -14
  7. package/bin/exiftool_files/lib/Archive/Zip/Archive.pm +399 -65
  8. package/bin/exiftool_files/lib/Archive/Zip/DirectoryMember.pm +1 -1
  9. package/bin/exiftool_files/lib/Archive/Zip/FileMember.pm +1 -1
  10. package/bin/exiftool_files/lib/Archive/Zip/Member.pm +499 -195
  11. package/bin/exiftool_files/lib/Archive/Zip/NewFileMember.pm +1 -1
  12. package/bin/exiftool_files/lib/Archive/Zip/StringMember.pm +2 -2
  13. package/bin/exiftool_files/lib/Archive/Zip/ZipFileMember.pm +79 -20
  14. package/bin/exiftool_files/lib/Archive/Zip.pm +179 -29
  15. package/bin/exiftool_files/lib/AutoLoader.pm +453 -0
  16. package/bin/exiftool_files/lib/B/Deparse.pm +209 -137
  17. package/bin/exiftool_files/lib/B.pm +1 -1
  18. package/bin/exiftool_files/lib/Benchmark.pm +1123 -0
  19. package/bin/exiftool_files/lib/Class/Struct.pm +2 -2
  20. package/bin/exiftool_files/lib/Compress/Raw/Bzip2.pm +14 -9
  21. package/bin/exiftool_files/lib/Compress/Raw/Lzma.pm +982 -0
  22. package/bin/exiftool_files/lib/Compress/Raw/Zlib.pm +91 -86
  23. package/bin/exiftool_files/lib/Compress/Zlib.pm +105 -100
  24. package/bin/exiftool_files/lib/Config.pm +9 -9
  25. package/bin/exiftool_files/lib/Config_heavy.pl +36 -33
  26. package/bin/exiftool_files/lib/CryptX.pm +2 -82
  27. package/bin/exiftool_files/lib/Data/Dumper.pm +2 -2
  28. package/bin/exiftool_files/lib/Digest/MD5.pm +12 -9
  29. package/bin/exiftool_files/lib/Digest/Perl/MD5.pm +1 -191
  30. package/bin/exiftool_files/lib/Digest/base.pm +26 -20
  31. package/bin/exiftool_files/lib/DynaLoader.pm +7 -4
  32. package/bin/exiftool_files/lib/Encode.pm +3 -3
  33. package/bin/exiftool_files/lib/Errno.pm +13 -13
  34. package/bin/exiftool_files/lib/Exporter/Heavy.pm +2 -2
  35. package/bin/exiftool_files/lib/Exporter.pm +1 -1
  36. package/bin/exiftool_files/lib/ExtUtils/Command/MM.pm +323 -0
  37. package/bin/exiftool_files/lib/ExtUtils/Command.pm +382 -0
  38. package/bin/exiftool_files/lib/File/Find.pm +1 -1
  39. package/bin/exiftool_files/lib/File/Glob.pm +1 -8
  40. package/bin/exiftool_files/lib/File/GlobMapper.pm +2 -2
  41. package/bin/exiftool_files/lib/File/HomeDir/Darwin/Carbon.pm +2 -40
  42. package/bin/exiftool_files/lib/File/HomeDir/Darwin/Cocoa.pm +2 -34
  43. package/bin/exiftool_files/lib/File/HomeDir/Darwin.pm +2 -28
  44. package/bin/exiftool_files/lib/File/HomeDir/Driver.pm +2 -35
  45. package/bin/exiftool_files/lib/File/HomeDir/FreeDesktop.pm +2 -62
  46. package/bin/exiftool_files/lib/File/HomeDir/MacOS9.pm +2 -53
  47. package/bin/exiftool_files/lib/File/HomeDir/Test.pm +2 -43
  48. package/bin/exiftool_files/lib/File/HomeDir/Unix.pm +2 -53
  49. package/bin/exiftool_files/lib/File/HomeDir/Windows.pm +2 -69
  50. package/bin/exiftool_files/lib/File/HomeDir.pm +5 -416
  51. package/bin/exiftool_files/lib/File/Path.pm +3 -3
  52. package/bin/exiftool_files/lib/File/Spec/Win32.pm +2 -2
  53. package/bin/exiftool_files/lib/File/Temp.pm +70 -35
  54. package/bin/exiftool_files/lib/File/Which.pm +1 -240
  55. package/bin/exiftool_files/lib/File/stat.pm +3 -2
  56. package/bin/exiftool_files/lib/IO/Compress/Adapter/Bzip2.pm +16 -17
  57. package/bin/exiftool_files/lib/IO/Compress/Adapter/Deflate.pm +19 -20
  58. package/bin/exiftool_files/lib/IO/Compress/Base/Common.pm +5 -5
  59. package/bin/exiftool_files/lib/IO/Compress/Base.pm +35 -26
  60. package/bin/exiftool_files/lib/IO/Compress/Brotli.pm +159 -0
  61. package/bin/exiftool_files/lib/IO/Compress/Bzip2.pm +50 -25
  62. package/bin/exiftool_files/lib/IO/Compress/Gzip/Constants.pm +6 -6
  63. package/bin/exiftool_files/lib/IO/Compress/Gzip.pm +58 -32
  64. package/bin/exiftool_files/lib/IO/Compress/RawDeflate.pm +63 -38
  65. package/bin/exiftool_files/lib/IO/Compress/Zlib/Extra.pm +20 -20
  66. package/bin/exiftool_files/lib/IO/Dir.pm +1 -1
  67. package/bin/exiftool_files/lib/IO/File.pm +1 -1
  68. package/bin/exiftool_files/lib/IO/Handle.pm +1 -21
  69. package/bin/exiftool_files/lib/IO/Pipe.pm +1 -1
  70. package/bin/exiftool_files/lib/IO/Seekable.pm +1 -1
  71. package/bin/exiftool_files/lib/IO/Select.pm +16 -2
  72. package/bin/exiftool_files/lib/IO/Socket/INET.pm +14 -9
  73. package/bin/exiftool_files/lib/IO/Socket/UNIX.pm +17 -1
  74. package/bin/exiftool_files/lib/IO/Socket.pm +474 -126
  75. package/bin/exiftool_files/lib/IO/String.pm +425 -0
  76. package/bin/exiftool_files/lib/IO/Uncompress/Adapter/Inflate.pm +13 -14
  77. package/bin/exiftool_files/lib/IO/Uncompress/Base.pm +142 -132
  78. package/bin/exiftool_files/lib/IO/Uncompress/Brotli.pm +119 -0
  79. package/bin/exiftool_files/lib/IO/Uncompress/Gunzip.pm +43 -37
  80. package/bin/exiftool_files/lib/IO/Uncompress/RawInflate.pm +49 -43
  81. package/bin/exiftool_files/lib/IO.pm +2 -2
  82. package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +44 -31
  83. package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +2 -2
  84. package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +20 -7
  85. package/bin/exiftool_files/lib/Image/ExifTool/GM.pm +543 -0
  86. package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.pm +332 -149
  87. package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +9 -4
  88. package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +32 -4
  89. package/bin/exiftool_files/lib/Image/ExifTool/MakerNotes.pm +2 -2
  90. package/bin/exiftool_files/lib/Image/ExifTool/Microsoft.pm +1 -1
  91. package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +331 -22
  92. package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +55 -1
  93. package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +1 -0
  94. package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +21 -3
  95. package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +3 -3
  96. package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +40 -24
  97. package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +61 -30
  98. package/bin/exiftool_files/lib/Image/ExifTool/README +2 -0
  99. package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +1 -1
  100. package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +4815 -4775
  101. package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +931 -617
  102. package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +30 -8
  103. package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +10 -4
  104. package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +4 -2
  105. package/bin/exiftool_files/lib/Image/ExifTool.pm +77 -41
  106. package/bin/exiftool_files/lib/Image/ExifTool.pod +24 -11
  107. package/bin/exiftool_files/lib/List/Util.pm +97 -8
  108. package/bin/exiftool_files/lib/MIME/Base64.pm +5 -5
  109. package/bin/exiftool_files/lib/MIME/Charset/_Compat.pm +106 -0
  110. package/bin/exiftool_files/lib/MIME/Charset.pm +1303 -0
  111. package/bin/exiftool_files/lib/Math/BigFloat.pm +444 -27
  112. package/bin/exiftool_files/lib/Math/BigInt/Calc.pm +296 -313
  113. package/bin/exiftool_files/lib/Math/BigInt/FastCalc.pm +1 -1
  114. package/bin/exiftool_files/lib/Math/BigInt/GMP.pm +2 -115
  115. package/bin/exiftool_files/lib/Math/BigInt/LTM.pm +2 -24
  116. package/bin/exiftool_files/lib/Math/BigInt/Lib.pm +61 -32
  117. package/bin/exiftool_files/lib/Math/BigInt.pm +292 -107
  118. package/bin/exiftool_files/lib/POSIX.pm +1 -1
  119. package/bin/exiftool_files/lib/PerlIO/scalar.pm +41 -0
  120. package/bin/exiftool_files/lib/PerlIO.pm +397 -0
  121. package/bin/exiftool_files/lib/Portable/CPAN.pm +94 -94
  122. package/bin/exiftool_files/lib/Portable/Config.pm +94 -94
  123. package/bin/exiftool_files/lib/Portable/FileSpec.pm +180 -180
  124. package/bin/exiftool_files/lib/Portable/HomeDir.pm +110 -110
  125. package/bin/exiftool_files/lib/Portable/LoadYaml.pm +430 -430
  126. package/bin/exiftool_files/lib/Portable/minicpan.pm +55 -55
  127. package/bin/exiftool_files/lib/Portable.pm +246 -320
  128. package/bin/exiftool_files/lib/Scalar/Util.pm +9 -4
  129. package/bin/exiftool_files/lib/Socket.pm +16 -12
  130. package/bin/exiftool_files/lib/Storable.pm +1444 -1441
  131. package/bin/exiftool_files/lib/TAP/Base.pm +133 -0
  132. package/bin/exiftool_files/lib/TAP/Formatter/Base.pm +467 -0
  133. package/bin/exiftool_files/lib/TAP/Formatter/Color.pm +116 -0
  134. package/bin/exiftool_files/lib/TAP/Formatter/Console/ParallelSession.pm +201 -0
  135. package/bin/exiftool_files/lib/TAP/Formatter/Console/Session.pm +205 -0
  136. package/bin/exiftool_files/lib/TAP/Formatter/Console.pm +100 -0
  137. package/bin/exiftool_files/lib/TAP/Formatter/File/Session.pm +95 -0
  138. package/bin/exiftool_files/lib/TAP/Formatter/File.pm +56 -0
  139. package/bin/exiftool_files/lib/TAP/Formatter/Session.pm +220 -0
  140. package/bin/exiftool_files/lib/TAP/Harness/Beyond.pod +426 -0
  141. package/bin/exiftool_files/lib/TAP/Harness/Env.pm +215 -0
  142. package/bin/exiftool_files/lib/TAP/Harness.pm +1054 -0
  143. package/bin/exiftool_files/lib/TAP/Object.pm +155 -0
  144. package/bin/exiftool_files/lib/TAP/Parser/Aggregator.pm +414 -0
  145. package/bin/exiftool_files/lib/TAP/Parser/Grammar.pm +584 -0
  146. package/bin/exiftool_files/lib/TAP/Parser/Iterator/Array.pm +100 -0
  147. package/bin/exiftool_files/lib/TAP/Parser/Iterator/Process.pm +378 -0
  148. package/bin/exiftool_files/lib/TAP/Parser/Iterator/Stream.pm +116 -0
  149. package/bin/exiftool_files/lib/TAP/Parser/Iterator.pm +162 -0
  150. package/bin/exiftool_files/lib/TAP/Parser/IteratorFactory.pm +339 -0
  151. package/bin/exiftool_files/lib/TAP/Parser/Multiplexer.pm +194 -0
  152. package/bin/exiftool_files/lib/TAP/Parser/Result/Bailout.pm +62 -0
  153. package/bin/exiftool_files/lib/TAP/Parser/Result/Comment.pm +60 -0
  154. package/bin/exiftool_files/lib/TAP/Parser/Result/Plan.pm +119 -0
  155. package/bin/exiftool_files/lib/TAP/Parser/Result/Pragma.pm +62 -0
  156. package/bin/exiftool_files/lib/TAP/Parser/Result/Test.pm +271 -0
  157. package/bin/exiftool_files/lib/TAP/Parser/Result/Unknown.pm +48 -0
  158. package/bin/exiftool_files/lib/TAP/Parser/Result/Version.pm +62 -0
  159. package/bin/exiftool_files/lib/TAP/Parser/Result/YAML.pm +61 -0
  160. package/bin/exiftool_files/lib/TAP/Parser/Result.pm +297 -0
  161. package/bin/exiftool_files/lib/TAP/Parser/ResultFactory.pm +183 -0
  162. package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Job.pm +127 -0
  163. package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Spinner.pm +61 -0
  164. package/bin/exiftool_files/lib/TAP/Parser/Scheduler.pm +448 -0
  165. package/bin/exiftool_files/lib/TAP/Parser/Source.pm +381 -0
  166. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Executable.pm +184 -0
  167. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/File.pm +136 -0
  168. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Handle.pm +124 -0
  169. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Perl.pm +370 -0
  170. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/RawTAP.pm +130 -0
  171. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler.pm +191 -0
  172. package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Reader.pm +332 -0
  173. package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Writer.pm +254 -0
  174. package/bin/exiftool_files/lib/TAP/Parser.pm +1931 -0
  175. package/bin/exiftool_files/lib/Test/Builder/Formatter.pm +107 -0
  176. package/bin/exiftool_files/lib/Test/Builder/IO/Scalar.pm +659 -0
  177. package/bin/exiftool_files/lib/Test/Builder/Module.pm +182 -0
  178. package/bin/exiftool_files/lib/Test/Builder/Tester/Color.pm +51 -0
  179. package/bin/exiftool_files/lib/Test/Builder/Tester.pm +675 -0
  180. package/bin/exiftool_files/lib/Test/Builder/TodoDiag.pm +68 -0
  181. package/bin/exiftool_files/lib/Test/Builder.pm +2653 -0
  182. package/bin/exiftool_files/lib/Test/Harness.pm +618 -0
  183. package/bin/exiftool_files/lib/Test/More.pm +1997 -0
  184. package/bin/exiftool_files/lib/Test/Simple.pm +220 -0
  185. package/bin/exiftool_files/lib/Test/Tester/Capture.pm +241 -0
  186. package/bin/exiftool_files/lib/Test/Tester/CaptureRunner.pm +79 -0
  187. package/bin/exiftool_files/lib/Test/Tester/Delegate.pm +45 -0
  188. package/bin/exiftool_files/lib/Test/Tester.pm +695 -0
  189. package/bin/exiftool_files/lib/Test/Tutorial.pod +618 -0
  190. package/bin/exiftool_files/lib/Test/use/ok.pm +64 -0
  191. package/bin/exiftool_files/lib/Text/ParseWords.pm +303 -0
  192. package/bin/exiftool_files/lib/Tie/StdHandle.pm +2 -2
  193. package/bin/exiftool_files/lib/Time/HiRes.pm +73 -68
  194. package/bin/exiftool_files/lib/Time/Local.pm +82 -35
  195. package/bin/exiftool_files/lib/Time/Piece.pm +19 -4
  196. package/bin/exiftool_files/lib/Time/Seconds.pm +1 -1
  197. package/bin/exiftool_files/lib/UNIVERSAL.pm +203 -0
  198. package/bin/exiftool_files/lib/Unicode/GCString.pm +60 -0
  199. package/bin/exiftool_files/lib/Unicode/LineBreak/Constants.pm +68 -0
  200. package/bin/exiftool_files/lib/Unicode/LineBreak.pm +248 -0
  201. package/bin/exiftool_files/lib/Win32/API/Struct.pm +1 -177
  202. package/bin/exiftool_files/lib/Win32/API/Type.pm +1 -100
  203. package/bin/exiftool_files/lib/Win32/API.pm +1 -830
  204. package/bin/exiftool_files/lib/Win32/FindFile.pm +2 -123
  205. package/bin/exiftool_files/lib/Win32.pm +213 -89
  206. package/bin/exiftool_files/lib/Win32API/File.pm +1 -1
  207. package/bin/exiftool_files/lib/auto/B/B.xs.dll +0 -0
  208. package/bin/exiftool_files/lib/auto/Compress/Raw/Bzip2/Bzip2.xs.dll +0 -0
  209. package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/Lzma.xs.dll +0 -0
  210. package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/autosplit.ix +3 -0
  211. package/bin/exiftool_files/lib/auto/Compress/Raw/Zlib/Zlib.xs.dll +0 -0
  212. package/bin/exiftool_files/lib/auto/CryptX/CryptX.xs.dll +0 -0
  213. package/bin/exiftool_files/lib/auto/Cwd/Cwd.xs.dll +0 -0
  214. package/bin/exiftool_files/lib/auto/Data/Dumper/Dumper.xs.dll +0 -0
  215. package/bin/exiftool_files/lib/auto/Digest/MD5/MD5.xs.dll +0 -0
  216. package/bin/exiftool_files/lib/auto/Digest/SHA/SHA.xs.dll +0 -0
  217. package/bin/exiftool_files/lib/auto/Encode/Encode.xs.dll +0 -0
  218. package/bin/exiftool_files/lib/auto/Fcntl/Fcntl.xs.dll +0 -0
  219. package/bin/exiftool_files/lib/auto/File/Glob/Glob.xs.dll +0 -0
  220. package/bin/exiftool_files/lib/auto/IO/Compress/Brotli/Brotli.xs.dll +0 -0
  221. package/bin/exiftool_files/lib/auto/IO/IO.xs.dll +0 -0
  222. package/bin/exiftool_files/lib/auto/List/Util/Util.xs.dll +0 -0
  223. package/bin/exiftool_files/lib/auto/MIME/Base64/Base64.xs.dll +0 -0
  224. package/bin/exiftool_files/lib/auto/Math/BigInt/FastCalc/FastCalc.xs.dll +0 -0
  225. package/bin/exiftool_files/lib/auto/Math/BigInt/GMP/GMP.xs.dll +0 -0
  226. package/bin/exiftool_files/lib/auto/POSIX/POSIX.xs.dll +0 -0
  227. package/bin/exiftool_files/lib/auto/PerlIO/scalar/scalar.xs.dll +0 -0
  228. package/bin/exiftool_files/lib/auto/Socket/Socket.xs.dll +0 -0
  229. package/bin/exiftool_files/lib/auto/Storable/Storable.xs.dll +0 -0
  230. package/bin/exiftool_files/lib/auto/Time/HiRes/HiRes.xs.dll +0 -0
  231. package/bin/exiftool_files/lib/auto/Time/Piece/Piece.xs.dll +0 -0
  232. package/bin/exiftool_files/lib/auto/Unicode/LineBreak/LineBreak.xs.dll +0 -0
  233. package/bin/exiftool_files/lib/auto/Win32/API/API.xs.dll +0 -0
  234. package/bin/exiftool_files/lib/auto/Win32/FindFile/FindFile.xs.dll +0 -0
  235. package/bin/exiftool_files/lib/auto/Win32/Win32.xs.dll +0 -0
  236. package/bin/exiftool_files/lib/auto/Win32API/File/File.xs.dll +0 -0
  237. package/bin/exiftool_files/lib/auto/mro/mro.xs.dll +0 -0
  238. package/bin/exiftool_files/lib/auto/re/re.xs.dll +0 -0
  239. package/bin/exiftool_files/lib/feature.pm +49 -17
  240. package/bin/exiftool_files/lib/mro.pm +4 -20
  241. package/bin/exiftool_files/lib/overload.pm +15 -15
  242. package/bin/exiftool_files/lib/parent.pm +10 -2
  243. package/bin/exiftool_files/lib/re.pm +91 -33
  244. package/bin/exiftool_files/lib/warnings.pm +17 -6
  245. package/bin/exiftool_files/libgcc_s_seh-1.dll +0 -0
  246. package/bin/exiftool_files/liblzma-5__.dll +0 -0
  247. package/bin/exiftool_files/libstdc++-6.dll +0 -0
  248. package/bin/exiftool_files/libwinpthread-1.dll +0 -0
  249. package/bin/exiftool_files/perl.exe +0 -0
  250. package/bin/exiftool_files/perl532.dll +0 -0
  251. package/package.json +7 -5
  252. package/bin/exiftool_files/libgcc_s_dw2-1.dll +0 -0
  253. package/bin/exiftool_files/perl530.dll +0 -0
@@ -8,9 +8,9 @@ use bytes;
8
8
 
9
9
  our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS);
10
10
 
11
- $VERSION = '2.086';
11
+ $VERSION = '2.100';
12
12
 
13
- use IO::Compress::Gzip::Constants 2.086 ;
13
+ use IO::Compress::Gzip::Constants 2.100 ;
14
14
 
15
15
  sub ExtraFieldError
16
16
  {
@@ -36,11 +36,11 @@ sub validateExtraFieldPair
36
36
  return ExtraFieldError("SubField Data is a reference")
37
37
  if ref $pair->[1] ;
38
38
 
39
- # ID is exactly two chars
39
+ # ID is exactly two chars
40
40
  return ExtraFieldError("SubField ID not two chars long")
41
41
  unless length $pair->[0] == GZIP_FEXTRA_SUBFIELD_ID_SIZE ;
42
42
 
43
- # Check that the 2nd byte of the ID isn't 0
43
+ # Check that the 2nd byte of the ID isn't 0
44
44
  return ExtraFieldError("SubField ID 2nd byte is 0x00")
45
45
  if $strict && $gzipMode && substr($pair->[0], 1, 1) eq "\x00" ;
46
46
 
@@ -74,7 +74,7 @@ sub parseRawExtra
74
74
  return ExtraFieldError("Truncated in FEXTRA Body Section")
75
75
  if $offset + GZIP_FEXTRA_SUBFIELD_HEADER_SIZE > $XLEN ;
76
76
 
77
- my $id = substr($data, $offset, GZIP_FEXTRA_SUBFIELD_ID_SIZE);
77
+ my $id = substr($data, $offset, GZIP_FEXTRA_SUBFIELD_ID_SIZE);
78
78
  $offset += GZIP_FEXTRA_SUBFIELD_ID_SIZE;
79
79
 
80
80
  my $subLen = unpack("v", substr($data, $offset,
@@ -84,8 +84,8 @@ sub parseRawExtra
84
84
  return ExtraFieldError("Truncated in FEXTRA Body Section")
85
85
  if $offset + $subLen > $XLEN ;
86
86
 
87
- my $bad = validateExtraFieldPair( [$id,
88
- substr($data, $offset, $subLen)],
87
+ my $bad = validateExtraFieldPair( [$id,
88
+ substr($data, $offset, $subLen)],
89
89
  $strict, $gzipMode );
90
90
  return $bad if $bad ;
91
91
  push @$extraRef, [$id => substr($data, $offset, $subLen)]
@@ -94,7 +94,7 @@ sub parseRawExtra
94
94
  $offset += $subLen ;
95
95
  }
96
96
 
97
-
97
+
98
98
  return undef ;
99
99
  }
100
100
 
@@ -111,7 +111,7 @@ sub findID
111
111
  return undef
112
112
  if $offset + GZIP_FEXTRA_SUBFIELD_HEADER_SIZE > $XLEN ;
113
113
 
114
- my $id = substr($data, $offset, GZIP_FEXTRA_SUBFIELD_ID_SIZE);
114
+ my $id = substr($data, $offset, GZIP_FEXTRA_SUBFIELD_ID_SIZE);
115
115
  $offset += GZIP_FEXTRA_SUBFIELD_ID_SIZE;
116
116
 
117
117
  my $subLen = unpack("v", substr($data, $offset,
@@ -126,7 +126,7 @@ sub findID
126
126
 
127
127
  $offset += $subLen ;
128
128
  }
129
-
129
+
130
130
  return undef ;
131
131
  }
132
132
 
@@ -165,7 +165,7 @@ sub parseExtraField
165
165
  # $id2 => $data2,
166
166
  # ...
167
167
  # }
168
-
168
+
169
169
  if ( ! ref $dataRef ) {
170
170
 
171
171
  return undef
@@ -177,7 +177,7 @@ sub parseExtraField
177
177
  my $data = $dataRef;
178
178
  my $out = '' ;
179
179
 
180
- if (ref $data eq 'ARRAY') {
180
+ if (ref $data eq 'ARRAY') {
181
181
  if (ref $data->[0]) {
182
182
 
183
183
  foreach my $pair (@$data) {
@@ -188,30 +188,30 @@ sub parseExtraField
188
188
  return $bad if $bad ;
189
189
 
190
190
  $out .= mkSubField(@$pair);
191
- }
192
- }
191
+ }
192
+ }
193
193
  else {
194
194
  return ExtraFieldError("Not even number of elements")
195
195
  unless @$data % 2 == 0;
196
196
 
197
197
  for (my $ix = 0; $ix <= @$data -1 ; $ix += 2) {
198
198
  my $bad = validateExtraFieldPair([$data->[$ix],
199
- $data->[$ix+1]],
199
+ $data->[$ix+1]],
200
200
  $strict, $gzipMode) ;
201
201
  return $bad if $bad ;
202
202
 
203
203
  $out .= mkSubField($data->[$ix], $data->[$ix+1]);
204
- }
204
+ }
205
205
  }
206
- }
207
- elsif (ref $data eq 'HASH') {
206
+ }
207
+ elsif (ref $data eq 'HASH') {
208
208
  while (my ($id, $info) = each %$data) {
209
209
  my $bad = validateExtraFieldPair([$id, $info], $strict, $gzipMode);
210
210
  return $bad if $bad ;
211
211
 
212
212
  $out .= mkSubField($id, $info);
213
- }
214
- }
213
+ }
214
+ }
215
215
  else {
216
216
  return ExtraFieldError("Not a scalar, array ref or hash ref") ;
217
217
  }
@@ -18,7 +18,7 @@ use File::stat;
18
18
  use File::Spec;
19
19
 
20
20
  our @ISA = qw(Tie::Hash Exporter);
21
- our $VERSION = "1.40";
21
+ our $VERSION = "1.45";
22
22
 
23
23
  our @EXPORT_OK = qw(DIR_UNLINK);
24
24
 
@@ -135,7 +135,7 @@ require Exporter;
135
135
 
136
136
  our @ISA = qw(IO::Handle IO::Seekable Exporter);
137
137
 
138
- our $VERSION = "1.40";
138
+ our $VERSION = "1.45";
139
139
 
140
140
  our @EXPORT = @IO::Seekable::EXPORT;
141
141
 
@@ -270,7 +270,7 @@ use IO (); # Load the XS module
270
270
  require Exporter;
271
271
  our @ISA = qw(Exporter);
272
272
 
273
- our $VERSION = "1.40";
273
+ our $VERSION = "1.45";
274
274
 
275
275
  our @EXPORT_OK = qw(
276
276
  autoflush
@@ -431,26 +431,6 @@ sub say {
431
431
  print $this @_;
432
432
  }
433
433
 
434
- # Special XS wrapper to make them inherit lexical hints from the caller.
435
- _create_getline_subs( <<'END' ) or die $@;
436
- sub getline {
437
- @_ == 1 or croak 'usage: $io->getline()';
438
- my $this = shift;
439
- return scalar <$this>;
440
- }
441
-
442
- sub getlines {
443
- @_ == 1 or croak 'usage: $io->getlines()';
444
- wantarray or
445
- croak 'Can\'t call $io->getlines in a scalar context, use $io->getline';
446
- my $this = shift;
447
- return <$this>;
448
- }
449
- 1; # return true for error checking
450
- END
451
-
452
- *gets = \&getline; # deprecated
453
-
454
434
  sub truncate {
455
435
  @_ == 2 or croak 'usage: $io->truncate(LEN)';
456
436
  truncate($_[0], $_[1]);
@@ -13,7 +13,7 @@ use strict;
13
13
  use Carp;
14
14
  use Symbol;
15
15
 
16
- our $VERSION = "1.40";
16
+ our $VERSION = "1.45";
17
17
 
18
18
  sub new {
19
19
  my $type = shift;
@@ -106,7 +106,7 @@ require Exporter;
106
106
  our @EXPORT = qw(SEEK_SET SEEK_CUR SEEK_END);
107
107
  our @ISA = qw(Exporter);
108
108
 
109
- our $VERSION = "1.40";
109
+ our $VERSION = "1.45";
110
110
 
111
111
  sub seek {
112
112
  @_ == 3 or croak 'usage: $io->seek(POS, WHENCE)';
@@ -10,7 +10,7 @@ use strict;
10
10
  use warnings::register;
11
11
  require Exporter;
12
12
 
13
- our $VERSION = "1.40";
13
+ our $VERSION = "1.45";
14
14
 
15
15
  our @ISA = qw(Exporter); # This is only so we can do version checking
16
16
 
@@ -57,7 +57,21 @@ sub _fileno
57
57
  my($self, $f) = @_;
58
58
  return unless defined $f;
59
59
  $f = $f->[0] if ref($f) eq 'ARRAY';
60
- ($f =~ /^\d+$/) ? $f : fileno($f);
60
+ if($f =~ /^[0-9]+$/) { # plain file number
61
+ return $f;
62
+ }
63
+ elsif(defined(my $fd = fileno($f))) {
64
+ return $fd;
65
+ }
66
+ else {
67
+ # Neither a plain file number nor an opened filehandle; but maybe it was
68
+ # previously registered and has since been closed. ->remove still wants to
69
+ # know what fileno it had
70
+ foreach my $i ( FIRST_FD .. $#$self ) {
71
+ return $i - FIRST_FD if $self->[$i] == $f;
72
+ }
73
+ return undef;
74
+ }
61
75
  }
62
76
 
63
77
  sub _update
@@ -14,7 +14,7 @@ use Exporter;
14
14
  use Errno;
15
15
 
16
16
  our @ISA = qw(IO::Socket);
17
- our $VERSION = "1.40";
17
+ our $VERSION = "1.45";
18
18
 
19
19
  my $EINVAL = exists(&Errno::EINVAL) ? Errno::EINVAL() : 1;
20
20
 
@@ -79,7 +79,7 @@ sub _sock_info {
79
79
  if(defined $proto && $proto =~ /\D/) {
80
80
  my $num = _get_proto_number($proto);
81
81
  unless (defined $num) {
82
- $@ = "Bad protocol '$proto'";
82
+ $IO::Socket::errstr = $@ = "Bad protocol '$proto'";
83
83
  return;
84
84
  }
85
85
  $proto = $num;
@@ -94,7 +94,7 @@ sub _sock_info {
94
94
 
95
95
  $port = $serv[2] || $defport || $pnum;
96
96
  unless (defined $port) {
97
- $@ = "Bad service '$origport'";
97
+ $IO::Socket::errstr = $@ = "Bad service '$origport'";
98
98
  return;
99
99
  }
100
100
 
@@ -113,7 +113,7 @@ sub _error {
113
113
  {
114
114
  local($!);
115
115
  my $title = ref($sock).": ";
116
- $@ = join("", $_[0] =~ /^$title/ ? "" : $title, @_);
116
+ $IO::Socket::errstr = $@ = join("", $_[0] =~ /^$title/ ? "" : $title, @_);
117
117
  $sock->close()
118
118
  if(defined fileno($sock));
119
119
  }
@@ -404,14 +404,19 @@ Examples:
404
404
  Proto => udp,
405
405
  LocalAddr => 'localhost',
406
406
  Broadcast => 1 )
407
- or die "Can't bind : $@\n";
407
+ or die "Can't bind : $IO::Socket::errstr\n";
408
408
 
409
- B<NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE>
409
+ If the constructor fails it will return C<undef> and set the
410
+ C<$IO::Socket::errstr> package variable to contain an error message.
410
411
 
411
- As of VERSION 1.18 all IO::Socket objects have autoflush turned on
412
- by default. This was not the case with earlier releases.
412
+ $sock = IO::Socket::INET->new(...)
413
+ or die "Cannot create socket - $IO::Socket::errstr\n";
413
414
 
414
- B<NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE>
415
+ For legacy reasons the error message is also set into the global C<$@>
416
+ variable, and you may still find older code which looks here instead.
417
+
418
+ $sock = IO::Socket::INET->new(...)
419
+ or die "Cannot create socket - $@\n";
415
420
 
416
421
  =back
417
422
 
@@ -11,7 +11,7 @@ use IO::Socket;
11
11
  use Carp;
12
12
 
13
13
  our @ISA = qw(IO::Socket);
14
- our $VERSION = "1.40";
14
+ our $VERSION = "1.45";
15
15
 
16
16
  IO::Socket::UNIX->register_domain( AF_UNIX );
17
17
 
@@ -30,6 +30,10 @@ sub configure {
30
30
  $sock->socket(AF_UNIX, $type, 0) or
31
31
  return undef;
32
32
 
33
+ if(exists $arg->{Blocking}) {
34
+ $sock->blocking($arg->{Blocking}) or
35
+ return undef;
36
+ }
33
37
  if(exists $arg->{Local}) {
34
38
  my $addr = sockaddr_un($arg->{Local});
35
39
  $sock->bind($addr) or
@@ -123,6 +127,18 @@ be a C<Peer> specification.
123
127
 
124
128
  If the C<Listen> argument is given, but false, the queue size will be set to 5.
125
129
 
130
+ If the constructor fails it will return C<undef> and set the
131
+ C<$IO::Socket::errstr> package variable to contain an error message.
132
+
133
+ $sock = IO::Socket::UNIX->new(...)
134
+ or die "Cannot create socket - $IO::Socket::errstr\n";
135
+
136
+ For legacy reasons the error message is also set into the global C<$@>
137
+ variable, and you may still find older code which looks here instead.
138
+
139
+ $sock = IO::Socket::UNIX->new(...)
140
+ or die "Cannot create socket - $@\n";
141
+
126
142
  =back
127
143
 
128
144
  =head1 METHODS