exiftool-vendored.exe 12.82.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 (225) hide show
  1. package/README.md +6 -0
  2. package/bin/exiftool.exe +0 -0
  3. package/bin/exiftool_files/Licenses_Strawberry_Perl.zip +0 -0
  4. package/bin/exiftool_files/lib/Archive/Zip/Archive.pm +399 -65
  5. package/bin/exiftool_files/lib/Archive/Zip/DirectoryMember.pm +1 -1
  6. package/bin/exiftool_files/lib/Archive/Zip/FileMember.pm +1 -1
  7. package/bin/exiftool_files/lib/Archive/Zip/Member.pm +499 -195
  8. package/bin/exiftool_files/lib/Archive/Zip/NewFileMember.pm +1 -1
  9. package/bin/exiftool_files/lib/Archive/Zip/StringMember.pm +2 -2
  10. package/bin/exiftool_files/lib/Archive/Zip/ZipFileMember.pm +79 -20
  11. package/bin/exiftool_files/lib/Archive/Zip.pm +179 -29
  12. package/bin/exiftool_files/lib/AutoLoader.pm +453 -0
  13. package/bin/exiftool_files/lib/B/Deparse.pm +209 -137
  14. package/bin/exiftool_files/lib/B.pm +1 -1
  15. package/bin/exiftool_files/lib/Benchmark.pm +1123 -0
  16. package/bin/exiftool_files/lib/Class/Struct.pm +2 -2
  17. package/bin/exiftool_files/lib/Compress/Raw/Bzip2.pm +14 -9
  18. package/bin/exiftool_files/lib/Compress/Raw/Lzma.pm +982 -0
  19. package/bin/exiftool_files/lib/Compress/Raw/Zlib.pm +91 -86
  20. package/bin/exiftool_files/lib/Compress/Zlib.pm +105 -100
  21. package/bin/exiftool_files/lib/Config.pm +9 -9
  22. package/bin/exiftool_files/lib/Config_heavy.pl +36 -33
  23. package/bin/exiftool_files/lib/CryptX.pm +2 -82
  24. package/bin/exiftool_files/lib/Data/Dumper.pm +2 -2
  25. package/bin/exiftool_files/lib/Digest/MD5.pm +12 -9
  26. package/bin/exiftool_files/lib/Digest/Perl/MD5.pm +1 -191
  27. package/bin/exiftool_files/lib/Digest/base.pm +26 -20
  28. package/bin/exiftool_files/lib/DynaLoader.pm +7 -4
  29. package/bin/exiftool_files/lib/Encode.pm +3 -3
  30. package/bin/exiftool_files/lib/Errno.pm +13 -13
  31. package/bin/exiftool_files/lib/Exporter/Heavy.pm +2 -2
  32. package/bin/exiftool_files/lib/Exporter.pm +1 -1
  33. package/bin/exiftool_files/lib/ExtUtils/Command/MM.pm +323 -0
  34. package/bin/exiftool_files/lib/ExtUtils/Command.pm +382 -0
  35. package/bin/exiftool_files/lib/File/Find.pm +1 -1
  36. package/bin/exiftool_files/lib/File/Glob.pm +1 -8
  37. package/bin/exiftool_files/lib/File/GlobMapper.pm +2 -2
  38. package/bin/exiftool_files/lib/File/HomeDir/Darwin/Carbon.pm +2 -40
  39. package/bin/exiftool_files/lib/File/HomeDir/Darwin/Cocoa.pm +2 -34
  40. package/bin/exiftool_files/lib/File/HomeDir/Darwin.pm +2 -28
  41. package/bin/exiftool_files/lib/File/HomeDir/Driver.pm +2 -35
  42. package/bin/exiftool_files/lib/File/HomeDir/FreeDesktop.pm +2 -62
  43. package/bin/exiftool_files/lib/File/HomeDir/MacOS9.pm +2 -53
  44. package/bin/exiftool_files/lib/File/HomeDir/Test.pm +2 -43
  45. package/bin/exiftool_files/lib/File/HomeDir/Unix.pm +2 -53
  46. package/bin/exiftool_files/lib/File/HomeDir/Windows.pm +2 -69
  47. package/bin/exiftool_files/lib/File/HomeDir.pm +5 -416
  48. package/bin/exiftool_files/lib/File/Path.pm +3 -3
  49. package/bin/exiftool_files/lib/File/Spec/Win32.pm +2 -2
  50. package/bin/exiftool_files/lib/File/Temp.pm +70 -35
  51. package/bin/exiftool_files/lib/File/Which.pm +1 -240
  52. package/bin/exiftool_files/lib/File/stat.pm +3 -2
  53. package/bin/exiftool_files/lib/IO/Compress/Adapter/Bzip2.pm +16 -17
  54. package/bin/exiftool_files/lib/IO/Compress/Adapter/Deflate.pm +19 -20
  55. package/bin/exiftool_files/lib/IO/Compress/Base/Common.pm +5 -5
  56. package/bin/exiftool_files/lib/IO/Compress/Base.pm +35 -26
  57. package/bin/exiftool_files/lib/IO/Compress/Brotli.pm +159 -0
  58. package/bin/exiftool_files/lib/IO/Compress/Bzip2.pm +50 -25
  59. package/bin/exiftool_files/lib/IO/Compress/Gzip/Constants.pm +6 -6
  60. package/bin/exiftool_files/lib/IO/Compress/Gzip.pm +58 -32
  61. package/bin/exiftool_files/lib/IO/Compress/RawDeflate.pm +63 -38
  62. package/bin/exiftool_files/lib/IO/Compress/Zlib/Extra.pm +20 -20
  63. package/bin/exiftool_files/lib/IO/Dir.pm +1 -1
  64. package/bin/exiftool_files/lib/IO/File.pm +1 -1
  65. package/bin/exiftool_files/lib/IO/Handle.pm +1 -21
  66. package/bin/exiftool_files/lib/IO/Pipe.pm +1 -1
  67. package/bin/exiftool_files/lib/IO/Seekable.pm +1 -1
  68. package/bin/exiftool_files/lib/IO/Select.pm +16 -2
  69. package/bin/exiftool_files/lib/IO/Socket/INET.pm +14 -9
  70. package/bin/exiftool_files/lib/IO/Socket/UNIX.pm +17 -1
  71. package/bin/exiftool_files/lib/IO/Socket.pm +474 -126
  72. package/bin/exiftool_files/lib/IO/String.pm +425 -0
  73. package/bin/exiftool_files/lib/IO/Uncompress/Adapter/Inflate.pm +13 -14
  74. package/bin/exiftool_files/lib/IO/Uncompress/Base.pm +142 -132
  75. package/bin/exiftool_files/lib/IO/Uncompress/Brotli.pm +119 -0
  76. package/bin/exiftool_files/lib/IO/Uncompress/Gunzip.pm +43 -37
  77. package/bin/exiftool_files/lib/IO/Uncompress/RawInflate.pm +49 -43
  78. package/bin/exiftool_files/lib/IO.pm +2 -2
  79. package/bin/exiftool_files/lib/List/Util.pm +97 -8
  80. package/bin/exiftool_files/lib/MIME/Base64.pm +5 -5
  81. package/bin/exiftool_files/lib/MIME/Charset/_Compat.pm +106 -0
  82. package/bin/exiftool_files/lib/MIME/Charset.pm +1303 -0
  83. package/bin/exiftool_files/lib/Math/BigFloat.pm +444 -27
  84. package/bin/exiftool_files/lib/Math/BigInt/Calc.pm +296 -313
  85. package/bin/exiftool_files/lib/Math/BigInt/FastCalc.pm +1 -1
  86. package/bin/exiftool_files/lib/Math/BigInt/GMP.pm +2 -115
  87. package/bin/exiftool_files/lib/Math/BigInt/LTM.pm +2 -24
  88. package/bin/exiftool_files/lib/Math/BigInt/Lib.pm +61 -32
  89. package/bin/exiftool_files/lib/Math/BigInt.pm +292 -107
  90. package/bin/exiftool_files/lib/POSIX.pm +1 -1
  91. package/bin/exiftool_files/lib/PerlIO/scalar.pm +41 -0
  92. package/bin/exiftool_files/lib/PerlIO.pm +397 -0
  93. package/bin/exiftool_files/lib/Portable/CPAN.pm +94 -94
  94. package/bin/exiftool_files/lib/Portable/Config.pm +94 -94
  95. package/bin/exiftool_files/lib/Portable/FileSpec.pm +180 -180
  96. package/bin/exiftool_files/lib/Portable/HomeDir.pm +110 -110
  97. package/bin/exiftool_files/lib/Portable/LoadYaml.pm +430 -430
  98. package/bin/exiftool_files/lib/Portable/minicpan.pm +55 -55
  99. package/bin/exiftool_files/lib/Portable.pm +246 -320
  100. package/bin/exiftool_files/lib/Scalar/Util.pm +9 -4
  101. package/bin/exiftool_files/lib/Socket.pm +16 -12
  102. package/bin/exiftool_files/lib/Storable.pm +1444 -1441
  103. package/bin/exiftool_files/lib/TAP/Base.pm +133 -0
  104. package/bin/exiftool_files/lib/TAP/Formatter/Base.pm +467 -0
  105. package/bin/exiftool_files/lib/TAP/Formatter/Color.pm +116 -0
  106. package/bin/exiftool_files/lib/TAP/Formatter/Console/ParallelSession.pm +201 -0
  107. package/bin/exiftool_files/lib/TAP/Formatter/Console/Session.pm +205 -0
  108. package/bin/exiftool_files/lib/TAP/Formatter/Console.pm +100 -0
  109. package/bin/exiftool_files/lib/TAP/Formatter/File/Session.pm +95 -0
  110. package/bin/exiftool_files/lib/TAP/Formatter/File.pm +56 -0
  111. package/bin/exiftool_files/lib/TAP/Formatter/Session.pm +220 -0
  112. package/bin/exiftool_files/lib/TAP/Harness/Beyond.pod +426 -0
  113. package/bin/exiftool_files/lib/TAP/Harness/Env.pm +215 -0
  114. package/bin/exiftool_files/lib/TAP/Harness.pm +1054 -0
  115. package/bin/exiftool_files/lib/TAP/Object.pm +155 -0
  116. package/bin/exiftool_files/lib/TAP/Parser/Aggregator.pm +414 -0
  117. package/bin/exiftool_files/lib/TAP/Parser/Grammar.pm +584 -0
  118. package/bin/exiftool_files/lib/TAP/Parser/Iterator/Array.pm +100 -0
  119. package/bin/exiftool_files/lib/TAP/Parser/Iterator/Process.pm +378 -0
  120. package/bin/exiftool_files/lib/TAP/Parser/Iterator/Stream.pm +116 -0
  121. package/bin/exiftool_files/lib/TAP/Parser/Iterator.pm +162 -0
  122. package/bin/exiftool_files/lib/TAP/Parser/IteratorFactory.pm +339 -0
  123. package/bin/exiftool_files/lib/TAP/Parser/Multiplexer.pm +194 -0
  124. package/bin/exiftool_files/lib/TAP/Parser/Result/Bailout.pm +62 -0
  125. package/bin/exiftool_files/lib/TAP/Parser/Result/Comment.pm +60 -0
  126. package/bin/exiftool_files/lib/TAP/Parser/Result/Plan.pm +119 -0
  127. package/bin/exiftool_files/lib/TAP/Parser/Result/Pragma.pm +62 -0
  128. package/bin/exiftool_files/lib/TAP/Parser/Result/Test.pm +271 -0
  129. package/bin/exiftool_files/lib/TAP/Parser/Result/Unknown.pm +48 -0
  130. package/bin/exiftool_files/lib/TAP/Parser/Result/Version.pm +62 -0
  131. package/bin/exiftool_files/lib/TAP/Parser/Result/YAML.pm +61 -0
  132. package/bin/exiftool_files/lib/TAP/Parser/Result.pm +297 -0
  133. package/bin/exiftool_files/lib/TAP/Parser/ResultFactory.pm +183 -0
  134. package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Job.pm +127 -0
  135. package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Spinner.pm +61 -0
  136. package/bin/exiftool_files/lib/TAP/Parser/Scheduler.pm +448 -0
  137. package/bin/exiftool_files/lib/TAP/Parser/Source.pm +381 -0
  138. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Executable.pm +184 -0
  139. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/File.pm +136 -0
  140. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Handle.pm +124 -0
  141. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Perl.pm +370 -0
  142. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/RawTAP.pm +130 -0
  143. package/bin/exiftool_files/lib/TAP/Parser/SourceHandler.pm +191 -0
  144. package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Reader.pm +332 -0
  145. package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Writer.pm +254 -0
  146. package/bin/exiftool_files/lib/TAP/Parser.pm +1931 -0
  147. package/bin/exiftool_files/lib/Test/Builder/Formatter.pm +107 -0
  148. package/bin/exiftool_files/lib/Test/Builder/IO/Scalar.pm +659 -0
  149. package/bin/exiftool_files/lib/Test/Builder/Module.pm +182 -0
  150. package/bin/exiftool_files/lib/Test/Builder/Tester/Color.pm +51 -0
  151. package/bin/exiftool_files/lib/Test/Builder/Tester.pm +675 -0
  152. package/bin/exiftool_files/lib/Test/Builder/TodoDiag.pm +68 -0
  153. package/bin/exiftool_files/lib/Test/Builder.pm +2653 -0
  154. package/bin/exiftool_files/lib/Test/Harness.pm +618 -0
  155. package/bin/exiftool_files/lib/Test/More.pm +1997 -0
  156. package/bin/exiftool_files/lib/Test/Simple.pm +220 -0
  157. package/bin/exiftool_files/lib/Test/Tester/Capture.pm +241 -0
  158. package/bin/exiftool_files/lib/Test/Tester/CaptureRunner.pm +79 -0
  159. package/bin/exiftool_files/lib/Test/Tester/Delegate.pm +45 -0
  160. package/bin/exiftool_files/lib/Test/Tester.pm +695 -0
  161. package/bin/exiftool_files/lib/Test/Tutorial.pod +618 -0
  162. package/bin/exiftool_files/lib/Test/use/ok.pm +64 -0
  163. package/bin/exiftool_files/lib/Text/ParseWords.pm +303 -0
  164. package/bin/exiftool_files/lib/Tie/StdHandle.pm +2 -2
  165. package/bin/exiftool_files/lib/Time/HiRes.pm +73 -68
  166. package/bin/exiftool_files/lib/Time/Local.pm +82 -35
  167. package/bin/exiftool_files/lib/Time/Piece.pm +19 -4
  168. package/bin/exiftool_files/lib/Time/Seconds.pm +1 -1
  169. package/bin/exiftool_files/lib/UNIVERSAL.pm +203 -0
  170. package/bin/exiftool_files/lib/Unicode/GCString.pm +60 -0
  171. package/bin/exiftool_files/lib/Unicode/LineBreak/Constants.pm +68 -0
  172. package/bin/exiftool_files/lib/Unicode/LineBreak.pm +248 -0
  173. package/bin/exiftool_files/lib/Win32/API/Struct.pm +1 -177
  174. package/bin/exiftool_files/lib/Win32/API/Type.pm +1 -100
  175. package/bin/exiftool_files/lib/Win32/API.pm +1 -830
  176. package/bin/exiftool_files/lib/Win32/FindFile.pm +2 -123
  177. package/bin/exiftool_files/lib/Win32.pm +213 -89
  178. package/bin/exiftool_files/lib/Win32API/File.pm +1 -1
  179. package/bin/exiftool_files/lib/auto/B/B.xs.dll +0 -0
  180. package/bin/exiftool_files/lib/auto/Compress/Raw/Bzip2/Bzip2.xs.dll +0 -0
  181. package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/Lzma.xs.dll +0 -0
  182. package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/autosplit.ix +3 -0
  183. package/bin/exiftool_files/lib/auto/Compress/Raw/Zlib/Zlib.xs.dll +0 -0
  184. package/bin/exiftool_files/lib/auto/CryptX/CryptX.xs.dll +0 -0
  185. package/bin/exiftool_files/lib/auto/Cwd/Cwd.xs.dll +0 -0
  186. package/bin/exiftool_files/lib/auto/Data/Dumper/Dumper.xs.dll +0 -0
  187. package/bin/exiftool_files/lib/auto/Digest/MD5/MD5.xs.dll +0 -0
  188. package/bin/exiftool_files/lib/auto/Digest/SHA/SHA.xs.dll +0 -0
  189. package/bin/exiftool_files/lib/auto/Encode/Encode.xs.dll +0 -0
  190. package/bin/exiftool_files/lib/auto/Fcntl/Fcntl.xs.dll +0 -0
  191. package/bin/exiftool_files/lib/auto/File/Glob/Glob.xs.dll +0 -0
  192. package/bin/exiftool_files/lib/auto/IO/Compress/Brotli/Brotli.xs.dll +0 -0
  193. package/bin/exiftool_files/lib/auto/IO/IO.xs.dll +0 -0
  194. package/bin/exiftool_files/lib/auto/List/Util/Util.xs.dll +0 -0
  195. package/bin/exiftool_files/lib/auto/MIME/Base64/Base64.xs.dll +0 -0
  196. package/bin/exiftool_files/lib/auto/Math/BigInt/FastCalc/FastCalc.xs.dll +0 -0
  197. package/bin/exiftool_files/lib/auto/Math/BigInt/GMP/GMP.xs.dll +0 -0
  198. package/bin/exiftool_files/lib/auto/POSIX/POSIX.xs.dll +0 -0
  199. package/bin/exiftool_files/lib/auto/PerlIO/scalar/scalar.xs.dll +0 -0
  200. package/bin/exiftool_files/lib/auto/Socket/Socket.xs.dll +0 -0
  201. package/bin/exiftool_files/lib/auto/Storable/Storable.xs.dll +0 -0
  202. package/bin/exiftool_files/lib/auto/Time/HiRes/HiRes.xs.dll +0 -0
  203. package/bin/exiftool_files/lib/auto/Time/Piece/Piece.xs.dll +0 -0
  204. package/bin/exiftool_files/lib/auto/Unicode/LineBreak/LineBreak.xs.dll +0 -0
  205. package/bin/exiftool_files/lib/auto/Win32/API/API.xs.dll +0 -0
  206. package/bin/exiftool_files/lib/auto/Win32/FindFile/FindFile.xs.dll +0 -0
  207. package/bin/exiftool_files/lib/auto/Win32/Win32.xs.dll +0 -0
  208. package/bin/exiftool_files/lib/auto/Win32API/File/File.xs.dll +0 -0
  209. package/bin/exiftool_files/lib/auto/mro/mro.xs.dll +0 -0
  210. package/bin/exiftool_files/lib/auto/re/re.xs.dll +0 -0
  211. package/bin/exiftool_files/lib/feature.pm +49 -17
  212. package/bin/exiftool_files/lib/mro.pm +4 -20
  213. package/bin/exiftool_files/lib/overload.pm +15 -15
  214. package/bin/exiftool_files/lib/parent.pm +10 -2
  215. package/bin/exiftool_files/lib/re.pm +91 -33
  216. package/bin/exiftool_files/lib/warnings.pm +17 -6
  217. package/bin/exiftool_files/libgcc_s_seh-1.dll +0 -0
  218. package/bin/exiftool_files/liblzma-5__.dll +0 -0
  219. package/bin/exiftool_files/libstdc++-6.dll +0 -0
  220. package/bin/exiftool_files/libwinpthread-1.dll +0 -0
  221. package/bin/exiftool_files/perl.exe +0 -0
  222. package/bin/exiftool_files/perl532.dll +0 -0
  223. package/package.json +5 -3
  224. package/bin/exiftool_files/libgcc_s_dw2-1.dll +0 -0
  225. package/bin/exiftool_files/perl530.dll +0 -0
@@ -5,13 +5,19 @@ use strict;
5
5
  use Carp ();
6
6
  use Exporter;
7
7
 
8
- our $VERSION = '1.28';
8
+ our $VERSION = '1.30';
9
9
 
10
10
  use parent 'Exporter';
11
11
 
12
- our @EXPORT = qw( timegm timelocal );
13
- our @EXPORT_OK
14
- = qw( timegm_modern timelocal_modern timegm_nocheck timelocal_nocheck );
12
+ our @EXPORT = qw( timegm timelocal );
13
+ our @EXPORT_OK = qw(
14
+ timegm_modern
15
+ timelocal_modern
16
+ timegm_nocheck
17
+ timelocal_nocheck
18
+ timegm_posix
19
+ timelocal_posix
20
+ );
15
21
 
16
22
  my @MonthDays = ( 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 );
17
23
 
@@ -90,7 +96,7 @@ sub _daygm {
90
96
  - int( $year / 100 )
91
97
  + int( $year / 400 )
92
98
  + int( ( ( $month * 306 ) + 5 ) / 10 ) ) - $Epoc;
93
- }
99
+ }
94
100
  );
95
101
  }
96
102
 
@@ -109,7 +115,7 @@ sub timegm {
109
115
  if ( $Options{no_year_munging} ) {
110
116
  $year -= 1900;
111
117
  }
112
- else {
118
+ elsif ( !$Options{posix_year} ) {
113
119
  if ( $year >= 1000 ) {
114
120
  $year -= 1900;
115
121
  }
@@ -175,6 +181,11 @@ sub timegm_modern {
175
181
  return &timegm;
176
182
  }
177
183
 
184
+ sub timegm_posix {
185
+ local $Options{posix_year} = 1;
186
+ return &timegm;
187
+ }
188
+
178
189
  sub timelocal {
179
190
  my $ref_t = &timegm;
180
191
  my $loc_for_ref_t = _timegm( localtime($ref_t) );
@@ -204,8 +215,8 @@ sub timelocal {
204
215
 
205
216
  return $loc_t if $dst_off > 0;
206
217
 
207
- # If the original date was a non-extent gap in a forward DST jump,
208
- # we should now have the wrong answer - undo the DST adjustment
218
+ # If the original date was a non-existent gap in a forward DST jump, we
219
+ # should now have the wrong answer - undo the DST adjustment
209
220
  my ( $s, $m, $h ) = localtime($loc_t);
210
221
  $loc_t -= $dst_off if $s != $_[0] || $m != $_[1] || $h != $_[2];
211
222
 
@@ -222,6 +233,11 @@ sub timelocal_modern {
222
233
  return &timelocal;
223
234
  }
224
235
 
236
+ sub timelocal_posix {
237
+ local $Options{posix_year} = 1;
238
+ return &timelocal;
239
+ }
240
+
225
241
  1;
226
242
 
227
243
  # ABSTRACT: Efficiently compute time from local and GMT time
@@ -238,14 +254,14 @@ Time::Local - Efficiently compute time from local and GMT time
238
254
 
239
255
  =head1 VERSION
240
256
 
241
- version 1.28
257
+ version 1.30
242
258
 
243
259
  =head1 SYNOPSIS
244
260
 
245
- use Time::Local;
261
+ use Time::Local qw( timelocal_posix timegm_posix );
246
262
 
247
- my $time = timelocal( $sec, $min, $hour, $mday, $mon, $year );
248
- my $time = timegm( $sec, $min, $hour, $mday, $mon, $year );
263
+ my $time = timelocal_posix( $sec, $min, $hour, $mday, $mon, $year );
264
+ my $time = timegm_posix( $sec, $min, $hour, $mday, $mon, $year );
249
265
 
250
266
  =head1 DESCRIPTION
251
267
 
@@ -263,6 +279,32 @@ consistent with the values returned from C<localtime()> and C<gmtime()>.
263
279
 
264
280
  =head1 FUNCTIONS
265
281
 
282
+ =head2 C<timelocal_posix()> and C<timegm_posix()>
283
+
284
+ These functions are the exact inverse of Perl's built-in C<localtime> and
285
+ C<gmtime> functions. That means that calling C<< timelocal_posix(
286
+ localtime($value) ) >> will always give you the same C<$value> you started
287
+ with. The same applies to C<< timegm_posix( gmtime($value) ) >>.
288
+
289
+ The one exception is when the value returned from C<localtime()> represents an
290
+ ambiguous local time because of a DST change. See the documentation below for
291
+ more details.
292
+
293
+ These functions expect the year value to be the number of years since 1900,
294
+ which is what the C<localtime()> and C<gmtime()> built-ins returns.
295
+
296
+ They perform range checking by default on the input C<$sec>, C<$min>,
297
+ C<$hour>, C<$mday>, and C<$mon> values and will croak (using C<Carp::croak()>)
298
+ if given a value outside the allowed ranges.
299
+
300
+ While it would be nice to make this the default behavior, that would almost
301
+ certainly break a lot of code, so you must explicitly import these functions
302
+ and use them instead of the default C<timelocal()> and C<timegm()>.
303
+
304
+ You are B<strongly> encouraged to use these functions in any new code which
305
+ uses this module. It will almost certainly make your code's behavior less
306
+ surprising.
307
+
266
308
  =head2 C<timelocal_modern()> and C<timegm_modern()>
267
309
 
268
310
  When C<Time::Local> was first written, it was a common practice to represent
@@ -274,41 +316,44 @@ The default exports of C<timelocal()> and C<timegm()> do a complicated
274
316
  calculation when given a year value less than 1000. This leads to surprising
275
317
  results in many cases. See L</Year Value Interpretation> for details.
276
318
 
277
- The C<time*_modern()> subs do not do this year munging and simply take the
278
- year value as provided.
279
-
280
- While it would be nice to make this the default behavior, that would almost
281
- certainly break a lot of code, so you must explicitly import these subs and
282
- use them instead of the default C<timelocal()> and C<timegm()>.
319
+ The C<time*_modern()> functions do not do this year munging and simply take
320
+ the year value as provided.
283
321
 
284
- You are B<strongly> encouraged to use these subs in any new code which uses
285
- this module. It will almost certainly make your code's behavior less
286
- surprising.
322
+ They perform range checking by default on the input C<$sec>, C<$min>,
323
+ C<$hour>, C<$mday>, and C<$mon> values and will croak (using C<Carp::croak()>)
324
+ if given a value outside the allowed ranges.
287
325
 
288
326
  =head2 C<timelocal()> and C<timegm()>
289
327
 
290
328
  This module exports two functions by default, C<timelocal()> and C<timegm()>.
291
329
 
292
- The C<timelocal()> and C<timegm()> functions perform range checking on the
293
- input $sec, $min, $hour, $mday, and $mon values by default.
294
-
295
- =head2 C<timelocal_nocheck()> and C<timegm_nocheck()>
330
+ They perform range checking by default on the input C<$sec>, C<$min>,
331
+ C<$hour>, C<$mday>, and C<$mon> values and will croak (using C<Carp::croak()>)
332
+ if given a value outside the allowed ranges.
296
333
 
297
- If you are working with data you know to be valid, you can speed your code up
298
- by using the "nocheck" variants, C<timelocal_nocheck()> and
299
- C<timegm_nocheck()>. These variants must be explicitly imported.
334
+ B<Warning: The year value interpretation that these functions and their
335
+ nocheck variants use will almost certainly lead to bugs in your code, if not
336
+ now, then in the future. You are strongly discouraged from using these in new
337
+ code, and you should convert old code to using either the C<*_posix> or
338
+ C<*_modern> functions if possible.>
300
339
 
301
- use Time::Local 'timelocal_nocheck';
340
+ =head2 C<timelocal_nocheck()> and C<timegm_nocheck()>
302
341
 
303
- # The 365th day of 1999
304
- print scalar localtime timelocal_nocheck( 0, 0, 0, 365, 0, 99 );
342
+ If you are working with data you know to be valid, you can use the "nocheck"
343
+ variants, C<timelocal_nocheck()> and C<timegm_nocheck()>. These variants must
344
+ be explicitly imported.
305
345
 
306
346
  If you supply data which is not valid (month 27, second 1,000) the results
307
347
  will be unpredictable (so don't do that).
308
348
 
349
+ Note that my benchmarks show that this is just a 3% speed increase over the
350
+ checked versions, so unless calling C<Time::Local> is the hottest spot in your
351
+ application, using these nocheck variants is unlikely to have much impact on
352
+ your application.
353
+
309
354
  =head2 Year Value Interpretation
310
355
 
311
- B<This does not apply to C<timelocal_modern> or C<timegm_modern>. Use those
356
+ B<This does not apply to the C<*_posix> or C<*_modern> functions. Use those
312
357
  exports if you want to ensure consistent behavior as your code ages.>
313
358
 
314
359
  Strictly speaking, the year should be specified in a form consistent with
@@ -343,7 +388,9 @@ digit dates. Whenever possible, use an absolute four digit year instead.
343
388
  =back
344
389
 
345
390
  The scheme above allows interpretation of a wide range of dates, particularly
346
- if 4-digit years are used.
391
+ if 4-digit years are used. But it also means that the behavior of your code
392
+ changes as time passes, because the rolling "current century" changes each
393
+ year.
347
394
 
348
395
  =head2 Limits of time_t
349
396
 
@@ -367,7 +414,7 @@ occurs for two different GMT times on the same day. For example, in the
367
414
  "Europe/Paris" time zone, the local time of 2001-10-28 02:30:00 can represent
368
415
  either 2001-10-28 00:30:00 GMT, B<or> 2001-10-28 01:30:00 GMT.
369
416
 
370
- When given an ambiguous local time, the timelocal() function should always
417
+ When given an ambiguous local time, the timelocal() function will always
371
418
  return the epoch for the I<earlier> of the two possible GMT times.
372
419
 
373
420
  =head2 Non-Existent Local Times (DST)
@@ -457,7 +504,7 @@ Unknown <unknown@example.com>
457
504
 
458
505
  =head1 COPYRIGHT AND LICENSE
459
506
 
460
- This software is copyright (c) 1997 - 2018 by Graham Barr & Dave Rolsky.
507
+ This software is copyright (c) 1997 - 2020 by Graham Barr & Dave Rolsky.
461
508
 
462
509
  This is free software; you can redistribute it and/or modify it under
463
510
  the same terms as the Perl 5 programming language system itself.
@@ -19,7 +19,7 @@ our %EXPORT_TAGS = (
19
19
  ':override' => 'internal',
20
20
  );
21
21
 
22
- our $VERSION = '1.33';
22
+ our $VERSION = '1.3401';
23
23
 
24
24
  XSLoader::load( 'Time::Piece', $VERSION );
25
25
 
@@ -126,6 +126,7 @@ sub _mktime {
126
126
  if ($class->_is_time_struct($time)) {
127
127
  my @new_time = @$time;
128
128
  my @tm_parts = (@new_time[c_sec .. c_mon], $new_time[c_year]+1900);
129
+
129
130
  $new_time[c_epoch] = $islocal ? timelocal(@tm_parts) : timegm(@tm_parts);
130
131
 
131
132
  return wantarray ? @new_time : bless [@new_time[0..9], $islocal], $class;
@@ -805,8 +806,14 @@ sub use_locale {
805
806
  #get locale month/day names from posix strftime (from Piece.xs)
806
807
  my $locales = _get_localization();
807
808
 
808
- $locales->{PM} ||= '';
809
- $locales->{AM} ||= '';
809
+ #If AM and PM are the same, set both to ''
810
+ if ( !$locales->{PM}
811
+ || !$locales->{AM}
812
+ || ( $locales->{PM} eq $locales->{AM} ) )
813
+ {
814
+ $locales->{PM} = '';
815
+ $locales->{AM} = '';
816
+ }
810
817
 
811
818
  $locales->{pm} = lc $locales->{PM};
812
819
  $locales->{am} = lc $locales->{AM};
@@ -896,7 +903,7 @@ in perlfunc will still return what you expect.
896
903
 
897
904
  The module actually implements most of an interface described by
898
905
  Larry Wall on the perl5-porters mailing list here:
899
- L<http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-01/msg00241.html>
906
+ L<https://www.nntp.perl.org/group/perl.perl5.porters/2000/01/msg5283.html>
900
907
 
901
908
  =head1 USAGE
902
909
 
@@ -1152,6 +1159,14 @@ moves afoot to fix that in perl. Alternatively use 64 bit perl. Or if none
1152
1159
  of those are options, use the L<DateTime> module which has support for years
1153
1160
  well into the future and past.
1154
1161
 
1162
+ Also, the internal representation of Time::Piece->strftime deviates from the
1163
+ standard POSIX implementation in that is uses the epoch (instead of separate
1164
+ year, month, day parts). This change was added in version 1.30. If you must
1165
+ have a more traditional strftime (which will normally never calculate day
1166
+ light saving times correctly), you can pass the date parts from Time::Piece
1167
+ into the strftime function provided by the POSIX module
1168
+ (see strftime in L<POSIX> ).
1169
+
1155
1170
  =head1 AUTHOR
1156
1171
 
1157
1172
  Matt Sergeant, matt@sergeant.org
@@ -1,7 +1,7 @@
1
1
  package Time::Seconds;
2
2
  use strict;
3
3
 
4
- our $VERSION = '1.33';
4
+ our $VERSION = '1.3401';
5
5
 
6
6
  use Exporter 5.57 'import';
7
7
 
@@ -0,0 +1,203 @@
1
+ package UNIVERSAL;
2
+
3
+ our $VERSION = '1.13';
4
+
5
+ # UNIVERSAL should not contain any extra subs/methods beyond those
6
+ # that it exists to define. The existence of import() below is a historical
7
+ # accident that can't be fixed without breaking code.
8
+
9
+ # Make sure that even though the import method is called, it doesn't do
10
+ # anything unless called on UNIVERSAL.
11
+ sub import {
12
+ return unless $_[0] eq __PACKAGE__;
13
+ return unless @_ > 1;
14
+ require Carp;
15
+ Carp::croak("UNIVERSAL does not export anything");
16
+ }
17
+
18
+ 1;
19
+ __END__
20
+
21
+ =head1 NAME
22
+
23
+ UNIVERSAL - base class for ALL classes (blessed references)
24
+
25
+ =head1 SYNOPSIS
26
+
27
+ $is_io = $fd->isa("IO::Handle");
28
+ $is_io = Class->isa("IO::Handle");
29
+
30
+ $does_log = $obj->DOES("Logger");
31
+ $does_log = Class->DOES("Logger");
32
+
33
+ $sub = $obj->can("print");
34
+ $sub = Class->can("print");
35
+
36
+ $sub = eval { $ref->can("fandango") };
37
+ $ver = $obj->VERSION;
38
+
39
+ # but never do this!
40
+ $is_io = UNIVERSAL::isa($fd, "IO::Handle");
41
+ $sub = UNIVERSAL::can($obj, "print");
42
+
43
+ =head1 DESCRIPTION
44
+
45
+ C<UNIVERSAL> is the base class from which all blessed references inherit.
46
+ See L<perlobj>.
47
+
48
+ C<UNIVERSAL> provides the following methods:
49
+
50
+ =over 4
51
+
52
+ =item C<< $obj->isa( TYPE ) >>
53
+
54
+ =item C<< CLASS->isa( TYPE ) >>
55
+
56
+ =item C<< eval { VAL->isa( TYPE ) } >>
57
+
58
+ Where
59
+
60
+ =over 4
61
+
62
+ =item C<TYPE>
63
+
64
+ is a package name
65
+
66
+ =item C<$obj>
67
+
68
+ is a blessed reference or a package name
69
+
70
+ =item C<CLASS>
71
+
72
+ is a package name
73
+
74
+ =item C<VAL>
75
+
76
+ is any of the above or an unblessed reference
77
+
78
+ =back
79
+
80
+ When used as an instance or class method (C<< $obj->isa( TYPE ) >>),
81
+ C<isa> returns I<true> if $obj is blessed into package C<TYPE> or
82
+ inherits from package C<TYPE>.
83
+
84
+ When used as a class method (C<< CLASS->isa( TYPE ) >>, sometimes
85
+ referred to as a static method), C<isa> returns I<true> if C<CLASS>
86
+ inherits from (or is itself) the name of the package C<TYPE> or
87
+ inherits from package C<TYPE>.
88
+
89
+ If you're not sure what you have (the C<VAL> case), wrap the method call in an
90
+ C<eval> block to catch the exception if C<VAL> is undefined.
91
+
92
+ If you want to be sure that you're calling C<isa> as a method, not a class,
93
+ check the invocand with C<blessed> from L<Scalar::Util> first:
94
+
95
+ use Scalar::Util 'blessed';
96
+
97
+ if ( blessed( $obj ) && $obj->isa("Some::Class") ) {
98
+ ...
99
+ }
100
+
101
+ =item C<< $obj->DOES( ROLE ) >>
102
+
103
+ =item C<< CLASS->DOES( ROLE ) >>
104
+
105
+ C<DOES> checks if the object or class performs the role C<ROLE>. A role is a
106
+ named group of specific behavior (often methods of particular names and
107
+ signatures), similar to a class, but not necessarily a complete class by
108
+ itself. For example, logging or serialization may be roles.
109
+
110
+ C<DOES> and C<isa> are similar, in that if either is true, you know that the
111
+ object or class on which you call the method can perform specific behavior.
112
+ However, C<DOES> is different from C<isa> in that it does not care I<how> the
113
+ invocand performs the operations, merely that it does. (C<isa> of course
114
+ mandates an inheritance relationship. Other relationships include aggregation,
115
+ delegation, and mocking.)
116
+
117
+ By default, classes in Perl only perform the C<UNIVERSAL> role, as well as the
118
+ role of all classes in their inheritance. In other words, by default C<DOES>
119
+ responds identically to C<isa>.
120
+
121
+ There is a relationship between roles and classes, as each class implies the
122
+ existence of a role of the same name. There is also a relationship between
123
+ inheritance and roles, in that a subclass that inherits from an ancestor class
124
+ implicitly performs any roles its parent performs. Thus you can use C<DOES> in
125
+ place of C<isa> safely, as it will return true in all places where C<isa> will
126
+ return true (provided that any overridden C<DOES> I<and> C<isa> methods behave
127
+ appropriately).
128
+
129
+ =item C<< $obj->can( METHOD ) >>
130
+
131
+ =item C<< CLASS->can( METHOD ) >>
132
+
133
+ =item C<< eval { VAL->can( METHOD ) } >>
134
+
135
+ C<can> checks if the object or class has a method called C<METHOD>. If it does,
136
+ then it returns a reference to the sub. If it does not, then it returns
137
+ I<undef>. This includes methods inherited or imported by C<$obj>, C<CLASS>, or
138
+ C<VAL>.
139
+
140
+ C<can> cannot know whether an object will be able to provide a method through
141
+ AUTOLOAD (unless the object's class has overridden C<can> appropriately), so a
142
+ return value of I<undef> does not necessarily mean the object will not be able
143
+ to handle the method call. To get around this some module authors use a forward
144
+ declaration (see L<perlsub>) for methods they will handle via AUTOLOAD. For
145
+ such 'dummy' subs, C<can> will still return a code reference, which, when
146
+ called, will fall through to the AUTOLOAD. If no suitable AUTOLOAD is provided,
147
+ calling the coderef will cause an error.
148
+
149
+ You may call C<can> as a class (static) method or an object method.
150
+
151
+ Again, the same rule about having a valid invocand applies -- use an C<eval>
152
+ block or C<blessed> if you need to be extra paranoid.
153
+
154
+ =item C<VERSION ( [ REQUIRE ] )>
155
+
156
+ C<VERSION> will return the value of the variable C<$VERSION> in the
157
+ package the object is blessed into. If C<REQUIRE> is given then
158
+ it will do a comparison and die if the package version is not
159
+ greater than or equal to C<REQUIRE>, or if either C<$VERSION> or C<REQUIRE>
160
+ is not a "lax" version number (as defined by the L<version> module).
161
+
162
+ The return from C<VERSION> will actually be the stringified version object
163
+ using the package C<$VERSION> scalar, which is guaranteed to be equivalent
164
+ but may not be precisely the contents of the C<$VERSION> scalar. If you want
165
+ the actual contents of C<$VERSION>, use C<$CLASS::VERSION> instead.
166
+
167
+ C<VERSION> can be called as either a class (static) method or an object
168
+ method.
169
+
170
+ =back
171
+
172
+ =head1 WARNINGS
173
+
174
+ B<NOTE:> C<can> directly uses Perl's internal code for method lookup, and
175
+ C<isa> uses a very similar method and cache-ing strategy. This may cause
176
+ strange effects if the Perl code dynamically changes @ISA in any package.
177
+
178
+ You may add other methods to the UNIVERSAL class via Perl or XS code.
179
+ You do not need to C<use UNIVERSAL> to make these methods
180
+ available to your program (and you should not do so).
181
+
182
+ =head1 EXPORTS
183
+
184
+ None.
185
+
186
+ Previous versions of this documentation suggested using C<isa> as
187
+ a function to determine the type of a reference:
188
+
189
+ $yes = UNIVERSAL::isa($h, "HASH");
190
+ $yes = UNIVERSAL::isa("Foo", "Bar");
191
+
192
+ The problem is that this code would I<never> call an overridden C<isa> method in
193
+ any class. Instead, use C<reftype> from L<Scalar::Util> for the first case:
194
+
195
+ use Scalar::Util 'reftype';
196
+
197
+ $yes = reftype( $h ) eq "HASH";
198
+
199
+ and the method form of C<isa> for the second:
200
+
201
+ $yes = Foo->isa("Bar");
202
+
203
+ =cut
@@ -0,0 +1,60 @@
1
+ #-*-perl-*-
2
+
3
+ package Unicode::GCString;
4
+ require 5.008;
5
+
6
+ =encoding utf-8
7
+
8
+ =cut
9
+
10
+ ### Pragmas:
11
+ use strict;
12
+ use warnings;
13
+ use vars qw($VERSION @EXPORT_OK @ISA);
14
+
15
+ ### Exporting:
16
+ use Exporter;
17
+ our @EXPORT_OK = qw();
18
+ our %EXPORT_TAGS = ('all' => [@EXPORT_OK]);
19
+
20
+ ### Inheritance:
21
+ our @ISA = qw(Exporter);
22
+
23
+ ### Other modules:
24
+ use Unicode::LineBreak;
25
+
26
+ ### Globals
27
+
28
+ # The package version
29
+ our $VERSION = '2013.10';
30
+
31
+ use overload
32
+ '@{}' => \&as_arrayref,
33
+ '${}' => \&as_scalarref,
34
+ '""' => \&as_string,
35
+ '.' => \&concat,
36
+ #XXX'.=' => \&concat, #FIXME:segfault
37
+ 'cmp' => \&cmp,
38
+ '<>' => \&next,
39
+ ;
40
+
41
+ sub new {
42
+ my $class = shift;
43
+
44
+ my $self;
45
+ if (scalar @_ <= 2) {
46
+ $self = __PACKAGE__->_new(@_);
47
+ } else {
48
+ my $str = shift;
49
+ my $lb = Unicode::LineBreak->new(@_);
50
+ $self = __PACKAGE__->_new($str, $lb);
51
+ }
52
+ bless $self, $class;
53
+ }
54
+
55
+ sub as_arrayref {
56
+ my @a = shift->as_array;
57
+ return \@a;
58
+ }
59
+
60
+ 1;
@@ -0,0 +1,68 @@
1
+ #-*- perl -*-
2
+
3
+ package Unicode::LineBreak;
4
+
5
+ use constant { M => 4, D => 3, I => 2, P => 1,};
6
+ use constant { MANDATORY => M, DIRECT => D, INDIRECT => I, PROHIBITED => P,
7
+ URGENT => 200,};
8
+
9
+ use constant { ALLOW_BEFORE => 2, PROHIBIT_BEFORE => 1,
10
+ BREAK_BEFORE => 2, # deprecated.
11
+ FLAGS => (2 | 1) };
12
+
13
+ use constant {
14
+ AMBIGUOUS_CYRILLIC => [0x0401, 0x0410..0x044F, 0x0451, ],
15
+ AMBIGUOUS_GREEK => [0x0391..0x03A9, 0x03B1..0x03C1, 0x03C3..0x03C9, ],
16
+ AMBIGUOUS_LATIN => [0x00C6, 0x00D0, 0x00D8, 0x00DE, 0x00DF, 0x00E0,
17
+ 0x00E1, 0x00E6, 0x00E8, 0x00E9, 0x00EA, 0x00EC, 0x00ED, 0x00F0,
18
+ 0x00F2, 0x00F3, 0x00F8, 0x00F9, 0x00FA, 0x00FC, 0x00FE, 0x0101,
19
+ 0x0111, 0x0113, 0x011B, 0x0126, 0x0127, 0x012B, 0x0131, 0x0132,
20
+ 0x0133, 0x0138, 0x013F, 0x0140, 0x0141, 0x0142, 0x0144, 0x0148,
21
+ 0x0149, 0x014A, 0x014B, 0x014D, 0x0152, 0x0153, 0x0166, 0x0167,
22
+ 0x016B, 0x01CE, 0x01D0, 0x01D2, 0x01D4, 0x01D6, 0x01D8, 0x01DA,
23
+ 0x01DC, 0x0251, 0x0261, ],
24
+ IDEOGRAPHIC_ITERATION_MARKS => [0x3005, 0x303B, 0x309D, 0x309E, 0x30FD,
25
+ 0x30FE, ],
26
+ KANA_PROLONGED_SOUND_MARKS => [0x30FC, 0xFF70, ],
27
+ KANA_SMALL_LETTERS => [0x3041, 0x3043, 0x3045, 0x3047, 0x3049, 0x3063,
28
+ 0x3083, 0x3085, 0x3087, 0x308E,
29
+ 0x3095, 0x3096,
30
+ 0x30A1, 0x30A3, 0x30A5, 0x30A7, 0x30A9, 0x30C3,
31
+ 0x30E3, 0x30E5, 0x30E7, 0x30EE,
32
+ 0x30F5, 0x30F6,
33
+ 0x31F0..0x31FF, 0xFF67..0xFF6F, ],
34
+ MASU_MARK => [0x303C, ],
35
+ QUESTIONABLE_NARROW_SIGNS => [0x00A2, 0x00A3, 0x00A5, 0x00A6, 0x00AC,
36
+ 0x00AF, ],
37
+ };
38
+ use constant {
39
+ AMBIGUOUS_ALPHABETICS => [
40
+ @{AMBIGUOUS_CYRILLIC()}, @{AMBIGUOUS_GREEK()},
41
+ @{AMBIGUOUS_LATIN()}, ],
42
+ KANA_NONSTARTERS => [
43
+ @{IDEOGRAPHIC_ITERATION_MARKS()}, @{KANA_PROLONGED_SOUND_MARKS()},
44
+ @{KANA_SMALL_LETTERS()}, @{MASU_MARK()}, ]
45
+ };
46
+ use constant {
47
+ BACKWORD_GUILLEMETS => [
48
+ 0x00AB, 0x2039, ],
49
+ FORWARD_GUILLEMETS => [
50
+ 0x00BB, 0x203A, ],
51
+ BACKWORD_QUOTES => [
52
+ 0x2018, 0x201C, ],
53
+ FORWARD_QUOTES => [
54
+ 0x2019, 0x201D, ],
55
+ };
56
+ # obsoleted names.
57
+ use constant {
58
+ LEFT_GUILLEMETS => BACKWORD_GUILLEMETS(),
59
+ RIGHT_GUILLEMETS => FORWARD_GUILLEMETS(),
60
+ LEFT_QUOTES => BACKWORD_QUOTES(),
61
+ RIGHT_QUOTES => FORWARD_QUOTES(),
62
+ };
63
+
64
+ use constant {
65
+ IDEOGRAPHIC_SPACE => [ 0x3000, ],
66
+ };
67
+
68
+ 1;