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
@@ -0,0 +1,201 @@
1
+ package TAP::Formatter::Console::ParallelSession;
2
+
3
+ use strict;
4
+ use warnings;
5
+ use File::Spec;
6
+ use File::Path;
7
+ use Carp;
8
+
9
+ use base 'TAP::Formatter::Console::Session';
10
+
11
+ use constant WIDTH => 72; # Because Eric says
12
+
13
+ my %shared;
14
+
15
+ sub _initialize {
16
+ my ( $self, $arg_for ) = @_;
17
+
18
+ $self->SUPER::_initialize($arg_for);
19
+ my $formatter = $self->formatter;
20
+
21
+ # Horrid bodge. This creates our shared context per harness. Maybe
22
+ # TAP::Harness should give us this?
23
+ my $context = $shared{$formatter} ||= $self->_create_shared_context;
24
+ push @{ $context->{active} }, $self;
25
+
26
+ return $self;
27
+ }
28
+
29
+ sub _create_shared_context {
30
+ my $self = shift;
31
+ return {
32
+ active => [],
33
+ tests => 0,
34
+ fails => 0,
35
+ };
36
+ }
37
+
38
+ =head1 NAME
39
+
40
+ TAP::Formatter::Console::ParallelSession - Harness output delegate for parallel console output
41
+
42
+ =head1 VERSION
43
+
44
+ Version 3.42
45
+
46
+ =cut
47
+
48
+ our $VERSION = '3.42';
49
+
50
+ =head1 DESCRIPTION
51
+
52
+ This provides console orientated output formatting for L<TAP::Harness>
53
+ when run with multiple L<TAP::Harness/jobs>.
54
+
55
+ =head1 SYNOPSIS
56
+
57
+ =cut
58
+
59
+ =head1 METHODS
60
+
61
+ =head2 Class Methods
62
+
63
+ =head3 C<header>
64
+
65
+ Output test preamble
66
+
67
+ =cut
68
+
69
+ sub header {
70
+ }
71
+
72
+ sub _clear_ruler {
73
+ my $self = shift;
74
+ $self->formatter->_output( "\r" . ( ' ' x WIDTH ) . "\r" );
75
+ }
76
+
77
+ my $now = 0;
78
+ my $start;
79
+
80
+ my $trailer = '... )===';
81
+ my $chop_length = WIDTH - length $trailer;
82
+
83
+ sub _output_ruler {
84
+ my ( $self, $refresh ) = @_;
85
+ my $new_now = time;
86
+ return if $new_now == $now and !$refresh;
87
+ $now = $new_now;
88
+ $start ||= $now;
89
+ my $formatter = $self->formatter;
90
+ return if $formatter->really_quiet;
91
+
92
+ my $context = $shared{$formatter};
93
+
94
+ my $ruler = sprintf '===( %7d;%d ', $context->{tests}, $now - $start;
95
+
96
+ for my $active ( @{ $context->{active} } ) {
97
+ my $parser = $active->parser;
98
+ my $tests = $parser->tests_run;
99
+ my $planned = $parser->tests_planned || '?';
100
+
101
+ $ruler .= sprintf '%' . length($planned) . "d/$planned ", $tests;
102
+ }
103
+ chop $ruler; # Remove a trailing space
104
+ $ruler .= ')===';
105
+
106
+ if ( length $ruler > WIDTH ) {
107
+ $ruler =~ s/(.{$chop_length}).*/$1$trailer/o;
108
+ }
109
+ else {
110
+ $ruler .= '=' x ( WIDTH - length($ruler) );
111
+ }
112
+ $formatter->_output("\r$ruler");
113
+ }
114
+
115
+ =head3 C<result>
116
+
117
+ Called by the harness for each line of TAP it receives .
118
+
119
+ =cut
120
+
121
+ sub result {
122
+ my ( $self, $result ) = @_;
123
+ my $formatter = $self->formatter;
124
+
125
+ # my $really_quiet = $formatter->really_quiet;
126
+ # my $show_count = $self->_should_show_count;
127
+
128
+ if ( $result->is_test ) {
129
+ my $context = $shared{$formatter};
130
+ $context->{tests}++;
131
+
132
+ my $active = $context->{active};
133
+ if ( @$active == 1 ) {
134
+
135
+ # There is only one test, so use the serial output format.
136
+ return $self->SUPER::result($result);
137
+ }
138
+
139
+ $self->_output_ruler( $self->parser->tests_run == 1 );
140
+ }
141
+ elsif ( $result->is_bailout ) {
142
+ $formatter->_failure_output(
143
+ "Bailout called. Further testing stopped: "
144
+ . $result->explanation
145
+ . "\n" );
146
+ }
147
+ }
148
+
149
+ =head3 C<clear_for_close>
150
+
151
+ =cut
152
+
153
+ sub clear_for_close {
154
+ my $self = shift;
155
+ my $formatter = $self->formatter;
156
+ return if $formatter->really_quiet;
157
+ my $context = $shared{$formatter};
158
+ if ( @{ $context->{active} } == 1 ) {
159
+ $self->SUPER::clear_for_close;
160
+ }
161
+ else {
162
+ $self->_clear_ruler;
163
+ }
164
+ }
165
+
166
+ =head3 C<close_test>
167
+
168
+ =cut
169
+
170
+ sub close_test {
171
+ my $self = shift;
172
+ my $name = $self->name;
173
+ my $parser = $self->parser;
174
+ my $formatter = $self->formatter;
175
+ my $context = $shared{$formatter};
176
+
177
+ $self->SUPER::close_test;
178
+
179
+ my $active = $context->{active};
180
+
181
+ my @pos = grep { $active->[$_]->name eq $name } 0 .. $#$active;
182
+
183
+ die "Can't find myself" unless @pos;
184
+ splice @$active, $pos[0], 1;
185
+
186
+ if ( @$active > 1 ) {
187
+ $self->_output_ruler(1);
188
+ }
189
+ elsif ( @$active == 1 ) {
190
+
191
+ # Print out "test/name.t ...."
192
+ $active->[0]->SUPER::header;
193
+ }
194
+ else {
195
+
196
+ # $self->formatter->_output("\n");
197
+ delete $shared{$formatter};
198
+ }
199
+ }
200
+
201
+ 1;
@@ -0,0 +1,205 @@
1
+ package TAP::Formatter::Console::Session;
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use base 'TAP::Formatter::Session';
7
+
8
+ my @ACCESSOR;
9
+
10
+ BEGIN {
11
+ my @CLOSURE_BINDING = qw( header result clear_for_close close_test );
12
+
13
+ for my $method (@CLOSURE_BINDING) {
14
+ no strict 'refs';
15
+ *$method = sub {
16
+ my $self = shift;
17
+ return ( $self->{_closures} ||= $self->_closures )->{$method}
18
+ ->(@_);
19
+ };
20
+ }
21
+ }
22
+
23
+ =head1 NAME
24
+
25
+ TAP::Formatter::Console::Session - Harness output delegate for default console output
26
+
27
+ =head1 VERSION
28
+
29
+ Version 3.42
30
+
31
+ =cut
32
+
33
+ our $VERSION = '3.42';
34
+
35
+ =head1 DESCRIPTION
36
+
37
+ This provides console orientated output formatting for TAP::Harness.
38
+
39
+ =cut
40
+
41
+ sub _get_output_result {
42
+ my $self = shift;
43
+
44
+ my @color_map = (
45
+ { test => sub { $_->is_test && !$_->is_ok },
46
+ colors => ['red'],
47
+ },
48
+ { test => sub { $_->is_test && $_->has_skip },
49
+ colors => [
50
+ 'white',
51
+ 'on_blue'
52
+ ],
53
+ },
54
+ { test => sub { $_->is_test && $_->has_todo },
55
+ colors => ['yellow'],
56
+ },
57
+ );
58
+
59
+ my $formatter = $self->formatter;
60
+ my $parser = $self->parser;
61
+
62
+ return $formatter->_colorizer
63
+ ? sub {
64
+ my $result = shift;
65
+ for my $col (@color_map) {
66
+ local $_ = $result;
67
+ if ( $col->{test}->() ) {
68
+ $formatter->_set_colors( @{ $col->{colors} } );
69
+ last;
70
+ }
71
+ }
72
+ $formatter->_output( $self->_format_for_output($result) );
73
+ $formatter->_set_colors('reset');
74
+ }
75
+ : sub {
76
+ $formatter->_output( $self->_format_for_output(shift) );
77
+ };
78
+ }
79
+
80
+ sub _closures {
81
+ my $self = shift;
82
+
83
+ my $parser = $self->parser;
84
+ my $formatter = $self->formatter;
85
+ my $pretty = $formatter->_format_name( $self->name );
86
+ my $show_count = $self->show_count;
87
+
88
+ my $really_quiet = $formatter->really_quiet;
89
+ my $quiet = $formatter->quiet;
90
+ my $verbose = $formatter->verbose;
91
+ my $directives = $formatter->directives;
92
+ my $failures = $formatter->failures;
93
+ my $comments = $formatter->comments;
94
+
95
+ my $output_result = $self->_get_output_result;
96
+
97
+ my $output = '_output';
98
+ my $plan = '';
99
+ my $newline_printed = 0;
100
+
101
+ my $last_status_printed = 0;
102
+
103
+ return {
104
+ header => sub {
105
+ $formatter->_output($pretty)
106
+ unless $really_quiet;
107
+ },
108
+
109
+ result => sub {
110
+ my $result = shift;
111
+
112
+ if ( $result->is_bailout ) {
113
+ $formatter->_failure_output(
114
+ "Bailout called. Further testing stopped: "
115
+ . $result->explanation
116
+ . "\n" );
117
+ }
118
+
119
+ return if $really_quiet;
120
+
121
+ my $is_test = $result->is_test;
122
+
123
+ # These are used in close_test - but only if $really_quiet
124
+ # is false - so it's safe to only set them here unless that
125
+ # relationship changes.
126
+
127
+ if ( !$plan ) {
128
+ my $planned = $parser->tests_planned || '?';
129
+ $plan = "/$planned ";
130
+ }
131
+ $output = $formatter->_get_output_method($parser);
132
+
133
+ if ( $show_count and $is_test ) {
134
+ my $number = $result->number;
135
+ my $now = CORE::time;
136
+
137
+ # Print status roughly once per second.
138
+ # We will always get the first number as a side effect of
139
+ # $last_status_printed starting with the value 0, which $now
140
+ # will never be. (Unless someone sets their clock to 1970)
141
+ if ( $last_status_printed != $now ) {
142
+ $formatter->$output("\r$pretty$number$plan");
143
+ $last_status_printed = $now;
144
+ }
145
+ }
146
+
147
+ if (!$quiet
148
+ && ( $verbose
149
+ || ( $is_test && $failures && !$result->is_ok )
150
+ || ( $comments && $result->is_comment )
151
+ || ( $directives && $result->has_directive ) )
152
+ )
153
+ {
154
+ unless ($newline_printed) {
155
+ $formatter->_output("\n");
156
+ $newline_printed = 1;
157
+ }
158
+ $output_result->($result);
159
+ $formatter->_output("\n");
160
+ }
161
+ },
162
+
163
+ clear_for_close => sub {
164
+ my $spaces
165
+ = ' ' x length( '.' . $pretty . $plan . $parser->tests_run );
166
+ $formatter->$output("\r$spaces");
167
+ },
168
+
169
+ close_test => sub {
170
+ if ( $show_count && !$really_quiet ) {
171
+ $self->clear_for_close;
172
+ $formatter->$output("\r$pretty");
173
+ }
174
+
175
+ # Avoid circular references
176
+ $self->parser(undef);
177
+ $self->{_closures} = {};
178
+
179
+ return if $really_quiet;
180
+
181
+ if ( my $skip_all = $parser->skip_all ) {
182
+ $formatter->_output("skipped: $skip_all\n");
183
+ }
184
+ elsif ( $parser->has_problems ) {
185
+ $self->_output_test_failure($parser);
186
+ }
187
+ else {
188
+ my $time_report = $self->time_report($formatter, $parser);
189
+ $formatter->_output( $self->_make_ok_line($time_report) );
190
+ }
191
+ },
192
+ };
193
+ }
194
+
195
+ =head2 C<< clear_for_close >>
196
+
197
+ =head2 C<< close_test >>
198
+
199
+ =head2 C<< header >>
200
+
201
+ =head2 C<< result >>
202
+
203
+ =cut
204
+
205
+ 1;
@@ -0,0 +1,100 @@
1
+ package TAP::Formatter::Console;
2
+
3
+ use strict;
4
+ use warnings;
5
+ use base 'TAP::Formatter::Base';
6
+ use POSIX qw(strftime);
7
+
8
+ =head1 NAME
9
+
10
+ TAP::Formatter::Console - Harness output delegate for default console output
11
+
12
+ =head1 VERSION
13
+
14
+ Version 3.42
15
+
16
+ =cut
17
+
18
+ our $VERSION = '3.42';
19
+
20
+ =head1 DESCRIPTION
21
+
22
+ This provides console orientated output formatting for TAP::Harness.
23
+
24
+ =head1 SYNOPSIS
25
+
26
+ use TAP::Formatter::Console;
27
+ my $harness = TAP::Formatter::Console->new( \%args );
28
+
29
+ =head2 C<< open_test >>
30
+
31
+ See L<TAP::Formatter::Base>
32
+
33
+ =cut
34
+
35
+ sub open_test {
36
+ my ( $self, $test, $parser ) = @_;
37
+
38
+ my $class
39
+ = $self->jobs > 1
40
+ ? 'TAP::Formatter::Console::ParallelSession'
41
+ : 'TAP::Formatter::Console::Session';
42
+
43
+ eval "require $class";
44
+ $self->_croak($@) if $@;
45
+
46
+ my $session = $class->new(
47
+ { name => $test,
48
+ formatter => $self,
49
+ parser => $parser,
50
+ show_count => $self->show_count,
51
+ }
52
+ );
53
+
54
+ $session->header;
55
+
56
+ return $session;
57
+ }
58
+
59
+ # Use _colorizer delegate to set output color. NOP if we have no delegate
60
+ sub _set_colors {
61
+ my ( $self, @colors ) = @_;
62
+ if ( my $colorizer = $self->_colorizer ) {
63
+ my $output_func = $self->{_output_func} ||= sub {
64
+ $self->_output(@_);
65
+ };
66
+ $colorizer->set_color( $output_func, $_ ) for @colors;
67
+ }
68
+ }
69
+
70
+ sub _failure_color {
71
+ my ($self) = @_;
72
+
73
+ return $ENV{'HARNESS_SUMMARY_COLOR_FAIL'} || 'red';
74
+ }
75
+
76
+ sub _success_color {
77
+ my ($self) = @_;
78
+
79
+ return $ENV{'HARNESS_SUMMARY_COLOR_SUCCESS'} || 'green';
80
+ }
81
+
82
+ sub _output_success {
83
+ my ( $self, $msg ) = @_;
84
+ $self->_set_colors( $self->_success_color() );
85
+ $self->_output($msg);
86
+ $self->_set_colors('reset');
87
+ }
88
+
89
+ sub _failure_output {
90
+ my $self = shift;
91
+ $self->_set_colors( $self->_failure_color() );
92
+ my $out = join '', @_;
93
+ my $has_newline = chomp $out;
94
+ $self->_output($out);
95
+ $self->_set_colors('reset');
96
+ $self->_output($/)
97
+ if $has_newline;
98
+ }
99
+
100
+ 1;
@@ -0,0 +1,95 @@
1
+ package TAP::Formatter::File::Session;
2
+
3
+ use strict;
4
+ use warnings;
5
+ use base 'TAP::Formatter::Session';
6
+
7
+ =head1 NAME
8
+
9
+ TAP::Formatter::File::Session - Harness output delegate for file output
10
+
11
+ =head1 VERSION
12
+
13
+ Version 3.42
14
+
15
+ =cut
16
+
17
+ our $VERSION = '3.42';
18
+
19
+ =head1 DESCRIPTION
20
+
21
+ This provides file orientated output formatting for L<TAP::Harness>.
22
+ It is particularly important when running with parallel tests, as it
23
+ ensures that test results are not interleaved, even when run
24
+ verbosely.
25
+
26
+ =cut
27
+
28
+ =head1 METHODS
29
+
30
+ =head2 result
31
+
32
+ Stores results for later output, all together.
33
+
34
+ =cut
35
+
36
+ sub result {
37
+ my $self = shift;
38
+ my $result = shift;
39
+
40
+ my $parser = $self->parser;
41
+ my $formatter = $self->formatter;
42
+
43
+ if ( $result->is_bailout ) {
44
+ $formatter->_failure_output(
45
+ "Bailout called. Further testing stopped: "
46
+ . $result->explanation
47
+ . "\n" );
48
+ return;
49
+ }
50
+
51
+ if (!$formatter->quiet
52
+ && ( $formatter->verbose
53
+ || ( $result->is_test && $formatter->failures && !$result->is_ok )
54
+ || ( $formatter->comments && $result->is_comment )
55
+ || ( $result->has_directive && $formatter->directives ) )
56
+ )
57
+ {
58
+ $self->{results} .= $self->_format_for_output($result) . "\n";
59
+ }
60
+ }
61
+
62
+ =head2 close_test
63
+
64
+ When the test file finishes, outputs the summary, together.
65
+
66
+ =cut
67
+
68
+ sub close_test {
69
+ my $self = shift;
70
+
71
+ # Avoid circular references
72
+ $self->parser(undef);
73
+
74
+ my $parser = $self->parser;
75
+ my $formatter = $self->formatter;
76
+ my $pretty = $formatter->_format_name( $self->name );
77
+
78
+ return if $formatter->really_quiet;
79
+ if ( my $skip_all = $parser->skip_all ) {
80
+ $formatter->_output( $pretty . "skipped: $skip_all\n" );
81
+ }
82
+ elsif ( $parser->has_problems ) {
83
+ $formatter->_output(
84
+ $pretty . ( $self->{results} ? "\n" . $self->{results} : "\n" ) );
85
+ $self->_output_test_failure($parser);
86
+ }
87
+ else {
88
+ my $time_report = $self->time_report($formatter, $parser);
89
+ $formatter->_output( $pretty
90
+ . ( $self->{results} ? "\n" . $self->{results} : "" )
91
+ . $self->_make_ok_line($time_report) );
92
+ }
93
+ }
94
+
95
+ 1;
@@ -0,0 +1,56 @@
1
+ package TAP::Formatter::File;
2
+
3
+ use strict;
4
+ use warnings;
5
+ use TAP::Formatter::File::Session;
6
+ use POSIX qw(strftime);
7
+
8
+ use base 'TAP::Formatter::Base';
9
+
10
+ =head1 NAME
11
+
12
+ TAP::Formatter::File - Harness output delegate for file output
13
+
14
+ =head1 VERSION
15
+
16
+ Version 3.42
17
+
18
+ =cut
19
+
20
+ our $VERSION = '3.42';
21
+
22
+ =head1 DESCRIPTION
23
+
24
+ This provides file orientated output formatting for TAP::Harness.
25
+
26
+ =head1 SYNOPSIS
27
+
28
+ use TAP::Formatter::File;
29
+ my $harness = TAP::Formatter::File->new( \%args );
30
+
31
+ =head2 C<< open_test >>
32
+
33
+ See L<TAP::Formatter::Base>
34
+
35
+ =cut
36
+
37
+ sub open_test {
38
+ my ( $self, $test, $parser ) = @_;
39
+
40
+ my $session = TAP::Formatter::File::Session->new(
41
+ { name => $test,
42
+ formatter => $self,
43
+ parser => $parser,
44
+ }
45
+ );
46
+
47
+ $session->header;
48
+
49
+ return $session;
50
+ }
51
+
52
+ sub _should_show_count {
53
+ return 0;
54
+ }
55
+
56
+ 1;