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,119 @@
1
+ package TAP::Parser::Result::Plan;
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use base 'TAP::Parser::Result';
7
+
8
+ =head1 NAME
9
+
10
+ TAP::Parser::Result::Plan - Plan result token.
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 is a subclass of L<TAP::Parser::Result>. A token of this class will be
23
+ returned if a plan line is encountered.
24
+
25
+ 1..1
26
+ ok 1 - woo hooo!
27
+
28
+ C<1..1> is the plan. Gotta have a plan.
29
+
30
+ =head1 OVERRIDDEN METHODS
31
+
32
+ Mainly listed here to shut up the pitiful screams of the pod coverage tests.
33
+ They keep me awake at night.
34
+
35
+ =over 4
36
+
37
+ =item * C<as_string>
38
+
39
+ =item * C<raw>
40
+
41
+ =back
42
+
43
+ =cut
44
+
45
+ ##############################################################################
46
+
47
+ =head2 Instance Methods
48
+
49
+ =head3 C<plan>
50
+
51
+ if ( $result->is_plan ) {
52
+ print $result->plan;
53
+ }
54
+
55
+ This is merely a synonym for C<as_string>.
56
+
57
+ =cut
58
+
59
+ sub plan { '1..' . shift->{tests_planned} }
60
+
61
+ ##############################################################################
62
+
63
+ =head3 C<tests_planned>
64
+
65
+ my $planned = $result->tests_planned;
66
+
67
+ Returns the number of tests planned. For example, a plan of C<1..17> will
68
+ cause this method to return '17'.
69
+
70
+ =cut
71
+
72
+ sub tests_planned { shift->{tests_planned} }
73
+
74
+ ##############################################################################
75
+
76
+ =head3 C<directive>
77
+
78
+ my $directive = $plan->directive;
79
+
80
+ If a SKIP directive is included with the plan, this method will return it.
81
+
82
+ 1..0 # SKIP: why bother?
83
+
84
+ =cut
85
+
86
+ sub directive { shift->{directive} }
87
+
88
+ ##############################################################################
89
+
90
+ =head3 C<has_skip>
91
+
92
+ if ( $result->has_skip ) { ... }
93
+
94
+ Returns a boolean value indicating whether or not this test has a SKIP
95
+ directive.
96
+
97
+ =head3 C<explanation>
98
+
99
+ my $explanation = $plan->explanation;
100
+
101
+ If a SKIP directive was included with the plan, this method will return the
102
+ explanation, if any.
103
+
104
+ =cut
105
+
106
+ sub explanation { shift->{explanation} }
107
+
108
+ =head3 C<todo_list>
109
+
110
+ my $todo = $result->todo_list;
111
+ for ( @$todo ) {
112
+ ...
113
+ }
114
+
115
+ =cut
116
+
117
+ sub todo_list { shift->{todo_list} }
118
+
119
+ 1;
@@ -0,0 +1,62 @@
1
+ package TAP::Parser::Result::Pragma;
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use base 'TAP::Parser::Result';
7
+
8
+ =head1 NAME
9
+
10
+ TAP::Parser::Result::Pragma - TAP pragma token.
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 is a subclass of L<TAP::Parser::Result>. A token of this class will be
23
+ returned if a pragma is encountered.
24
+
25
+ TAP version 13
26
+ pragma +strict, -foo
27
+
28
+ Pragmas are only supported from TAP version 13 onwards.
29
+
30
+ =head1 OVERRIDDEN METHODS
31
+
32
+ Mainly listed here to shut up the pitiful screams of the pod coverage tests.
33
+ They keep me awake at night.
34
+
35
+ =over 4
36
+
37
+ =item * C<as_string>
38
+
39
+ =item * C<raw>
40
+
41
+ =back
42
+
43
+ =cut
44
+
45
+ ##############################################################################
46
+
47
+ =head2 Instance Methods
48
+
49
+ =head3 C<pragmas>
50
+
51
+ if ( $result->is_pragma ) {
52
+ @pragmas = $result->pragmas;
53
+ }
54
+
55
+ =cut
56
+
57
+ sub pragmas {
58
+ my @pragmas = @{ shift->{pragmas} };
59
+ return wantarray ? @pragmas : \@pragmas;
60
+ }
61
+
62
+ 1;
@@ -0,0 +1,271 @@
1
+ package TAP::Parser::Result::Test;
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use base 'TAP::Parser::Result';
7
+
8
+ =head1 NAME
9
+
10
+ TAP::Parser::Result::Test - Test result token.
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 is a subclass of L<TAP::Parser::Result>. A token of this class will be
23
+ returned if a test line is encountered.
24
+
25
+ 1..1
26
+ ok 1 - woo hooo!
27
+
28
+ =head1 OVERRIDDEN METHODS
29
+
30
+ This class is the workhorse of the L<TAP::Parser> system. Most TAP lines will
31
+ be test lines and if C<< $result->is_test >>, then you have a bunch of methods
32
+ at your disposal.
33
+
34
+ =head2 Instance Methods
35
+
36
+ =cut
37
+
38
+ ##############################################################################
39
+
40
+ =head3 C<ok>
41
+
42
+ my $ok = $result->ok;
43
+
44
+ Returns the literal text of the C<ok> or C<not ok> status.
45
+
46
+ =cut
47
+
48
+ sub ok { shift->{ok} }
49
+
50
+ ##############################################################################
51
+
52
+ =head3 C<number>
53
+
54
+ my $test_number = $result->number;
55
+
56
+ Returns the number of the test, even if the original TAP output did not supply
57
+ that number.
58
+
59
+ =cut
60
+
61
+ sub number { shift->{test_num} }
62
+
63
+ sub _number {
64
+ my ( $self, $number ) = @_;
65
+ $self->{test_num} = $number;
66
+ }
67
+
68
+ ##############################################################################
69
+
70
+ =head3 C<description>
71
+
72
+ my $description = $result->description;
73
+
74
+ Returns the description of the test, if any. This is the portion after the
75
+ test number but before the directive.
76
+
77
+ =cut
78
+
79
+ sub description { shift->{description} }
80
+
81
+ ##############################################################################
82
+
83
+ =head3 C<directive>
84
+
85
+ my $directive = $result->directive;
86
+
87
+ Returns either C<TODO> or C<SKIP> if either directive was present for a test
88
+ line.
89
+
90
+ =cut
91
+
92
+ sub directive { shift->{directive} }
93
+
94
+ ##############################################################################
95
+
96
+ =head3 C<explanation>
97
+
98
+ my $explanation = $result->explanation;
99
+
100
+ If a test had either a C<TODO> or C<SKIP> directive, this method will return
101
+ the accompanying explanation, if present.
102
+
103
+ not ok 17 - 'Pigs can fly' # TODO not enough acid
104
+
105
+ For the above line, the explanation is I<not enough acid>.
106
+
107
+ =cut
108
+
109
+ sub explanation { shift->{explanation} }
110
+
111
+ ##############################################################################
112
+
113
+ =head3 C<is_ok>
114
+
115
+ if ( $result->is_ok ) { ... }
116
+
117
+ Returns a boolean value indicating whether or not the test passed. Remember
118
+ that for TODO tests, the test always passes.
119
+
120
+ If the test is unplanned, this method will always return false. See
121
+ C<is_unplanned>.
122
+
123
+ =cut
124
+
125
+ sub is_ok {
126
+ my $self = shift;
127
+
128
+ return if $self->is_unplanned;
129
+
130
+ # TODO directives reverse the sense of a test.
131
+ return $self->has_todo ? 1 : $self->ok !~ /not/;
132
+ }
133
+
134
+ ##############################################################################
135
+
136
+ =head3 C<is_actual_ok>
137
+
138
+ if ( $result->is_actual_ok ) { ... }
139
+
140
+ Returns a boolean value indicating whether or not the test passed, regardless
141
+ of its TODO status.
142
+
143
+ =cut
144
+
145
+ sub is_actual_ok {
146
+ my $self = shift;
147
+ return $self->{ok} !~ /not/;
148
+ }
149
+
150
+ ##############################################################################
151
+
152
+ =head3 C<actual_passed>
153
+
154
+ Deprecated. Please use C<is_actual_ok> instead.
155
+
156
+ =cut
157
+
158
+ sub actual_passed {
159
+ warn 'actual_passed() is deprecated. Please use "is_actual_ok()"';
160
+ goto &is_actual_ok;
161
+ }
162
+
163
+ ##############################################################################
164
+
165
+ =head3 C<todo_passed>
166
+
167
+ if ( $test->todo_passed ) {
168
+ # test unexpectedly succeeded
169
+ }
170
+
171
+ If this is a TODO test and an 'ok' line, this method returns true.
172
+ Otherwise, it will always return false (regardless of passing status on
173
+ non-todo tests).
174
+
175
+ This is used to track which tests unexpectedly succeeded.
176
+
177
+ =cut
178
+
179
+ sub todo_passed {
180
+ my $self = shift;
181
+ return $self->has_todo && $self->is_actual_ok;
182
+ }
183
+
184
+ ##############################################################################
185
+
186
+ =head3 C<todo_failed>
187
+
188
+ # deprecated in favor of 'todo_passed'. This method was horribly misnamed.
189
+
190
+ This was a badly misnamed method. It indicates which TODO tests unexpectedly
191
+ succeeded. Will now issue a warning and call C<todo_passed>.
192
+
193
+ =cut
194
+
195
+ sub todo_failed {
196
+ warn 'todo_failed() is deprecated. Please use "todo_passed()"';
197
+ goto &todo_passed;
198
+ }
199
+
200
+ ##############################################################################
201
+
202
+ =head3 C<has_skip>
203
+
204
+ if ( $result->has_skip ) { ... }
205
+
206
+ Returns a boolean value indicating whether or not this test has a SKIP
207
+ directive.
208
+
209
+ =head3 C<has_todo>
210
+
211
+ if ( $result->has_todo ) { ... }
212
+
213
+ Returns a boolean value indicating whether or not this test has a TODO
214
+ directive.
215
+
216
+ =head3 C<as_string>
217
+
218
+ print $result->as_string;
219
+
220
+ This method prints the test as a string. It will probably be similar, but
221
+ not necessarily identical, to the original test line. Directives are
222
+ capitalized, some whitespace may be trimmed and a test number will be added if
223
+ it was not present in the original line. If you need the original text of the
224
+ test line, use the C<raw> method.
225
+
226
+ =cut
227
+
228
+ sub as_string {
229
+ my $self = shift;
230
+ my $string = $self->ok . " " . $self->number;
231
+ if ( my $description = $self->description ) {
232
+ $string .= " $description";
233
+ }
234
+ if ( my $directive = $self->directive ) {
235
+ my $explanation = $self->explanation;
236
+ $string .= " # $directive $explanation";
237
+ }
238
+ return $string;
239
+ }
240
+
241
+ ##############################################################################
242
+
243
+ =head3 C<is_unplanned>
244
+
245
+ if ( $test->is_unplanned ) { ... }
246
+ $test->is_unplanned(1);
247
+
248
+ If a test number is greater than the number of planned tests, this method will
249
+ return true. Unplanned tests will I<always> return false for C<is_ok>,
250
+ regardless of whether or not the test C<has_todo>.
251
+
252
+ Note that if tests have a trailing plan, it is not possible to set this
253
+ property for unplanned tests as we do not know it's unplanned until the plan
254
+ is reached:
255
+
256
+ print <<'END';
257
+ ok 1
258
+ ok 2
259
+ 1..1
260
+ END
261
+
262
+ =cut
263
+
264
+ sub is_unplanned {
265
+ my $self = shift;
266
+ return ( $self->{unplanned} || '' ) unless @_;
267
+ $self->{unplanned} = !!shift;
268
+ return $self;
269
+ }
270
+
271
+ 1;
@@ -0,0 +1,48 @@
1
+ package TAP::Parser::Result::Unknown;
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use base 'TAP::Parser::Result';
7
+
8
+ =head1 NAME
9
+
10
+ TAP::Parser::Result::Unknown - Unknown result token.
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 is a subclass of L<TAP::Parser::Result>. A token of this class will be
23
+ returned if the parser does not recognize the token line. For example:
24
+
25
+ 1..5
26
+ VERSION 7
27
+ ok 1 - woo hooo!
28
+ ... woo hooo! is cool!
29
+
30
+ In the above "TAP", the second and fourth lines will generate "Unknown"
31
+ tokens.
32
+
33
+ =head1 OVERRIDDEN METHODS
34
+
35
+ Mainly listed here to shut up the pitiful screams of the pod coverage tests.
36
+ They keep me awake at night.
37
+
38
+ =over 4
39
+
40
+ =item * C<as_string>
41
+
42
+ =item * C<raw>
43
+
44
+ =back
45
+
46
+ =cut
47
+
48
+ 1;
@@ -0,0 +1,62 @@
1
+ package TAP::Parser::Result::Version;
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use base 'TAP::Parser::Result';
7
+
8
+ =head1 NAME
9
+
10
+ TAP::Parser::Result::Version - TAP syntax version token.
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 is a subclass of L<TAP::Parser::Result>. A token of this class will be
23
+ returned if a version line is encountered.
24
+
25
+ TAP version 13
26
+ ok 1
27
+ not ok 2
28
+
29
+ The first version of TAP to include an explicit version number is 13.
30
+
31
+ =head1 OVERRIDDEN METHODS
32
+
33
+ Mainly listed here to shut up the pitiful screams of the pod coverage tests.
34
+ They keep me awake at night.
35
+
36
+ =over 4
37
+
38
+ =item * C<as_string>
39
+
40
+ =item * C<raw>
41
+
42
+ =back
43
+
44
+ =cut
45
+
46
+ ##############################################################################
47
+
48
+ =head2 Instance Methods
49
+
50
+ =head3 C<version>
51
+
52
+ if ( $result->is_version ) {
53
+ print $result->version;
54
+ }
55
+
56
+ This is merely a synonym for C<as_string>.
57
+
58
+ =cut
59
+
60
+ sub version { shift->{version} }
61
+
62
+ 1;
@@ -0,0 +1,61 @@
1
+ package TAP::Parser::Result::YAML;
2
+
3
+ use strict;
4
+ use warnings;
5
+
6
+ use base 'TAP::Parser::Result';
7
+
8
+ =head1 NAME
9
+
10
+ TAP::Parser::Result::YAML - YAML result token.
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 is a subclass of L<TAP::Parser::Result>. A token of this class will be
23
+ returned if a YAML block is encountered.
24
+
25
+ 1..1
26
+ ok 1 - woo hooo!
27
+
28
+ C<1..1> is the plan. Gotta have a plan.
29
+
30
+ =head1 OVERRIDDEN METHODS
31
+
32
+ Mainly listed here to shut up the pitiful screams of the pod coverage tests.
33
+ They keep me awake at night.
34
+
35
+ =over 4
36
+
37
+ =item * C<as_string>
38
+
39
+ =item * C<raw>
40
+
41
+ =back
42
+
43
+ =cut
44
+
45
+ ##############################################################################
46
+
47
+ =head2 Instance Methods
48
+
49
+ =head3 C<data>
50
+
51
+ if ( $result->is_yaml ) {
52
+ print $result->data;
53
+ }
54
+
55
+ Return the parsed YAML data for this result
56
+
57
+ =cut
58
+
59
+ sub data { shift->{data} }
60
+
61
+ 1;