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
@@ -12,16 +12,20 @@ require Exporter;
12
12
 
13
13
  our @ISA = qw(Exporter);
14
14
  our @EXPORT_OK = qw(
15
- all any first min max minstr maxstr none notall product reduce sum sum0 shuffle uniq uniqnum uniqstr
15
+ all any first min max minstr maxstr none notall product reduce reductions sum sum0
16
+ sample shuffle uniq uniqint uniqnum uniqstr
16
17
  head tail pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst
17
18
  );
18
- our $VERSION = "1.50";
19
+ our $VERSION = "1.55";
19
20
  our $XS_VERSION = $VERSION;
20
- $VERSION = eval $VERSION;
21
+ $VERSION =~ tr/_//d;
21
22
 
22
23
  require XSLoader;
23
24
  XSLoader::load('List::Util', $XS_VERSION);
24
25
 
26
+ # Used by shuffle()
27
+ our $RAND;
28
+
25
29
  sub import
26
30
  {
27
31
  my $pkg = caller;
@@ -38,6 +42,7 @@ sub import
38
42
  # For objects returned by pairs()
39
43
  sub List::Util::_Pair::key { shift->[0] }
40
44
  sub List::Util::_Pair::value { shift->[1] }
45
+ sub List::Util::_Pair::TO_JSON { [ @{+shift} ] }
41
46
 
42
47
  =head1 NAME
43
48
 
@@ -46,13 +51,13 @@ List::Util - A selection of general-utility list subroutines
46
51
  =head1 SYNOPSIS
47
52
 
48
53
  use List::Util qw(
49
- reduce any all none notall first
54
+ reduce any all none notall first reductions
50
55
 
51
56
  max maxstr min minstr product sum sum0
52
57
 
53
58
  pairs unpairs pairkeys pairvalues pairfirst pairgrep pairmap
54
59
 
55
- shuffle uniq uniqnum uniqstr
60
+ shuffle uniq uniqint uniqnum uniqstr
56
61
  );
57
62
 
58
63
  =head1 DESCRIPTION
@@ -68,7 +73,8 @@ By default C<List::Util> does not export any subroutines.
68
73
 
69
74
  =head1 LIST-REDUCTION FUNCTIONS
70
75
 
71
- The following set of functions all reduce a list down to a single value.
76
+ The following set of functions all apply a given block of code to a list of
77
+ values.
72
78
 
73
79
  =cut
74
80
 
@@ -128,8 +134,28 @@ block that accumulates lengths by writing this instead as:
128
134
 
129
135
  $total = reduce { $a + length $b } 0, @strings
130
136
 
131
- The remaining list-reduction functions are all specialisations of this generic
132
- idea.
137
+ The other scalar-returning list reduction functions are all specialisations of
138
+ this generic idea.
139
+
140
+ =head2 reductions
141
+
142
+ @results = reductions { BLOCK } @list
143
+
144
+ I<Since version 1.54.>
145
+
146
+ Similar to C<reduce> except that it also returns the intermediate values along
147
+ with the final result. As before, C<$a> is set to the first element of the
148
+ given list, and the C<BLOCK> is then called once for remaining item in the
149
+ list set into C<$b>, with the result being captured for return as well as
150
+ becoming the new value for C<$a>.
151
+
152
+ The returned list will begin with the initial value for C<$a>, followed by
153
+ each return value from the block in order. The final value of the result will
154
+ be identical to what the C<reduce> function would have returned given the same
155
+ block and list.
156
+
157
+ reduce { "$a-$b" } "a".."d" # "a-b-c-d"
158
+ reductions { "$a-$b" } "a".."d" # "a", "a-b", "a-b-c", "a-b-c-d"
133
159
 
134
160
  =head2 any
135
161
 
@@ -341,6 +367,9 @@ equivalent:
341
367
  ...
342
368
  }
343
369
 
370
+ Since version C<1.51> they also have a C<TO_JSON> method to ease
371
+ serialisation.
372
+
344
373
  =head2 unpairs
345
374
 
346
375
  my @kvlist = unpairs @pairs
@@ -485,6 +514,25 @@ Returns the values of the input in a random order
485
514
 
486
515
  @cards = shuffle 0..51 # 0..51 in a random order
487
516
 
517
+ This function is affected by the C<$RAND> variable.
518
+
519
+ =cut
520
+
521
+ =head2 sample
522
+
523
+ my @items = sample $count, @values
524
+
525
+ I<Since version 1.54.>
526
+
527
+ Randomly select the given number of elements from the input list. Any given
528
+ position in the input list will be selected at most once.
529
+
530
+ If there are fewer than C<$count> items in the list then the function will
531
+ return once all of them have been randomly selected; effectively the function
532
+ behaves similarly to L</shuffle>.
533
+
534
+ This function is affected by the C<$RAND> variable.
535
+
488
536
  =head2 uniq
489
537
 
490
538
  my @subset = uniq @values
@@ -505,6 +553,28 @@ string, and no warning will be produced. It is left as-is in the returned
505
553
  list. Subsequent C<undef> values are still considered identical to the first,
506
554
  and will be removed.
507
555
 
556
+ =head2 uniqint
557
+
558
+ my @subset = uniqint @values
559
+
560
+ I<Since version 1.55.>
561
+
562
+ Filters a list of values to remove subsequent duplicates, as judged by an
563
+ integer numerical equality test. Preserves the order of unique elements, and
564
+ retains the first value of any duplicate set. Values in the returned list will
565
+ be coerced into integers.
566
+
567
+ my $count = uniqint @values
568
+
569
+ In scalar context, returns the number of elements that would have been
570
+ returned as a list.
571
+
572
+ Note that C<undef> is treated much as other numerical operations treat it; it
573
+ compares equal to zero but additionally produces a warning if such warnings
574
+ are enabled (C<use warnings 'uninitialized';>). In addition, an C<undef> in
575
+ the returned list is coerced into a numerical zero, so that the entire list of
576
+ values returned by C<uniqint> are well-behaved as integers.
577
+
508
578
  =head2 uniqnum
509
579
 
510
580
  my @subset = uniqnum @values
@@ -557,6 +627,8 @@ entire list of values returned by C<uniqstr> are well-behaved as strings.
557
627
 
558
628
  my @values = head $size, @list;
559
629
 
630
+ I<Since version 1.50.>
631
+
560
632
  Returns the first C<$size> elements from C<@list>. If C<$size> is negative, returns
561
633
  all but the last C<$size> elements from C<@list>.
562
634
 
@@ -570,6 +642,8 @@ all but the last C<$size> elements from C<@list>.
570
642
 
571
643
  my @values = tail $size, @list;
572
644
 
645
+ I<Since version 1.50.>
646
+
573
647
  Returns the last C<$size> elements from C<@list>. If C<$size> is negative, returns
574
648
  all but the first C<$size> elements from C<@list>.
575
649
 
@@ -579,6 +653,21 @@ all but the first C<$size> elements from C<@list>.
579
653
  @result = tail -2, qw( foo bar baz );
580
654
  # baz
581
655
 
656
+ =head1 CONFIGURATION VARIABLES
657
+
658
+ =head2 $RAND
659
+
660
+ local $List::Util::RAND = sub { ... };
661
+
662
+ I<Since version 1.54.>
663
+
664
+ This package variable is used by code which needs to generate random numbers
665
+ (such as the L</shuffle> and L</sample> functions). If set to a CODE reference
666
+ it provides an alternative to perl's builtin C<rand()> function. When a new
667
+ random number is needed this function will be invoked with no arguments and is
668
+ expected to return a floating-point value, of which only the fractional part
669
+ will be used.
670
+
582
671
  =head1 KNOWN BUGS
583
672
 
584
673
  =head2 RT #95409
@@ -1,14 +1,14 @@
1
1
  package MIME::Base64;
2
2
 
3
3
  use strict;
4
- use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
4
+ use warnings;
5
5
 
6
6
  require Exporter;
7
- @ISA = qw(Exporter);
8
- @EXPORT = qw(encode_base64 decode_base64);
9
- @EXPORT_OK = qw(encode_base64url decode_base64url encoded_base64_length decoded_base64_length);
7
+ our @ISA = qw(Exporter);
8
+ our @EXPORT = qw(encode_base64 decode_base64);
9
+ our @EXPORT_OK = qw(encode_base64url decode_base64url encoded_base64_length decoded_base64_length);
10
10
 
11
- $VERSION = '3.15';
11
+ our $VERSION = '3.16';
12
12
 
13
13
  require XSLoader;
14
14
  XSLoader::load('MIME::Base64', $VERSION);
@@ -0,0 +1,106 @@
1
+
2
+ package MIME::Charset::_Compat;
3
+ use 5.004;
4
+
5
+ use strict;
6
+ use Carp qw(croak);
7
+
8
+ use vars qw($VERSION);
9
+
10
+ $VERSION = "1.003.1";
11
+
12
+ sub FB_CROAK { 0x1; }
13
+ sub FB_PERLQQ { 0x100; }
14
+ sub FB_HTMLCREF { 0x200; }
15
+ sub FB_XMLCREF { 0x400; }
16
+ sub encode { $_[1]; }
17
+ sub decode { $_[1]; }
18
+ sub from_to {
19
+ if ((lc($_[2]) eq "us-ascii" or lc($_[1]) eq "us-ascii") and
20
+ $_[0] =~ s/[^\x01-\x7e]/?/g and $_[3] == 1) {
21
+ croak "Non-ASCII characters";
22
+ }
23
+ $_[0];
24
+ }
25
+ sub is_utf8 { 0; }
26
+ sub resolve_alias {
27
+ my $cset = lc(shift);
28
+ if ($cset eq "8bit" or $cset !~ /\S/) {
29
+ return undef;
30
+ } elsif ($cset eq '_unicode_') {
31
+ return $cset;
32
+ } else {
33
+ # Taken from Encode-2.24.
34
+ my %Winlatin2cp = (
35
+ 'latin1' => 1252,
36
+ 'latin2' => 1250,
37
+ 'cyrillic' => 1251,
38
+ 'greek' => 1253,
39
+ 'turkish' => 1254,
40
+ 'hebrew' => 1255,
41
+ 'arabic' => 1256,
42
+ 'baltic' => 1257,
43
+ 'vietnamese' => 1258,
44
+ );
45
+ my @Latin2iso = ( 0, 1, 2, 3, 4, 9, 10, 13, 14, 15, 16 );
46
+ $cset =~ s/^(\S+)[\s_]+(.*)$/$1-$2/i;
47
+ $cset =~ s/^UTF-8$/utf8/i;
48
+ $cset =~ s/^.*\bhk(?:scs)?[-_]?big5$/big5-hkscs/i;
49
+ $cset =~ s/^.*\bbig5-?hk(?:scs)?$/big5-hkscs/i;
50
+ $cset =~ s/^.*\btca[-_]?big5$/big5-eten/i;
51
+ $cset =~ s/^.*\bbig5-?et(?:en)?$/big5-eten/i;
52
+ $cset =~ s/^.*\bbig-?5$/big5-eten/i;
53
+ $cset =~ s/^.*\bks_c_5601-1987$/cp949/i;
54
+ $cset =~ s/^.*(?:x-)?windows-949$/cp949/i;
55
+ $cset =~ s/^.*(?:x-)?uhc$/cp949/i;
56
+ $cset =~ s/^.*\bkr.*euc$/euc-kr/i;
57
+ $cset =~ s/^.*\beuc.*kr$/euc-kr/i;
58
+ $cset =~ s/^.*\bsjis$/shiftjis/i;
59
+ $cset =~ s/^.*\bshift.*jis$/shiftjis/i;
60
+ $cset =~ s/^.*\bujis$/euc-jp/i;
61
+ $cset =~ s/^.*\bjp.*euc$/euc-jp/i;
62
+ $cset =~ s/^.*\beuc.*jp$/euc-jp/i;
63
+ $cset =~ s/^.*\bjis$/7bit-jis/i;
64
+ $cset =~ s/^.*\bGB[-_ ]?2312(?!-?raw).*$/euc-cn/i;
65
+ $cset =~ s/^gbk$/cp936/i;
66
+ $cset =~ s/^.*\bcn.*euc$/euc-cn/i;
67
+ $cset =~ s/^.*\beuc.*cn$/euc-cn/i;
68
+ $cset =~ s/^.*\bkoi8[-\s_]*([ru])$/koi8-$1/i;
69
+ $cset =~ s/^mac_(.*)$/mac$1/i;
70
+ $cset =~ s/^.*\b(?:cp|ibm|ms|windows)[-_ ]?(\d{2,4})$/cp$1/i;
71
+ $cset =~ s/^tis620$/iso-8859-11/i;
72
+ $cset =~ s/^thai$/iso-8859-11/i;
73
+ $cset =~ s/^hebrew$/iso-8859-8/i;
74
+ $cset =~ s/^greek$/iso-8859-7/i;
75
+ $cset =~ s/^arabic$/iso-8859-6/i;
76
+ $cset =~ s/^cyrillic$/iso-8859-5/i;
77
+ $cset =~ s/^ascii$/US-ascii/i;
78
+ if ($cset =~ /^.*\bwin(latin[12]|cyrillic|baltic|greek|turkish|
79
+ hebrew|arabic|baltic|vietnamese)$/ix) {
80
+ $cset = "cp" . $Winlatin2cp{lc($1)};
81
+ }
82
+ if ($cset =~ /^.*\b(?:iso[-_]?)?latin[-_]?(\d+)$/i) {
83
+ $cset = defined $Latin2iso[$1] ? "iso-8859-$Latin2iso[$1]" : undef;
84
+ }
85
+ $cset =~ s/^(.+)\@euro$/$1/i;
86
+ $cset =~ s/^.*\bANSI[-_]?X3\.4[-_]?1968$/ascii/i;
87
+ $cset =~ s/^.*\b(?:hp-)?(arabic|greek|hebrew|kana|roman|thai|turkish)8$/${1}8/i;
88
+ $cset =~ s/^.*\biso8859(\d+)$/iso-8859-$1/i;
89
+ $cset =~ s/^.*\biso[-_]?(\d+)[-_](\d+)$/iso-$1-$2/i;
90
+ $cset =~ s/^.*\bISO[-_]?646[-_]?US$/ascii/i;
91
+ $cset =~ s/^C$/ascii/i;
92
+ $cset =~ s/^(?:US-?)ascii$/ascii/i;
93
+ $cset =~ s/^UTF(16|32)$/UTF-$1/i;
94
+ $cset =~ s/^UTF(16|32)-?LE$/UTF-$1LE/i;
95
+ $cset =~ s/^UTF(16|32)-?BE$/UTF-$1BE/i;
96
+ $cset =~ s/^iso-10646-1$/UCS-2BE/i;
97
+ $cset =~ s/^UCS-?4-?(BE|LE)?$/uc("UTF-32$1")/ie;
98
+ $cset =~ s/^UCS-?2-?(BE)?$/UCS-2BE/i;
99
+ $cset =~ s/^UCS-?2-?LE$/UCS-2LE/i;
100
+ $cset =~ s/^UTF-?7$/UTF-7/i;
101
+ $cset =~ s/^(.*)$/\L$1/;
102
+ return $cset;
103
+ }
104
+ }
105
+
106
+ 1;