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
@@ -1,8 +1,9 @@
1
1
  package Digest::base;
2
2
 
3
3
  use strict;
4
- use vars qw($VERSION);
5
- $VERSION = "1.16";
4
+ use warnings;
5
+
6
+ our $VERSION = "1.19";
6
7
 
7
8
  # subclass is supposed to implement at least these
8
9
  sub new;
@@ -12,21 +13,21 @@ sub digest;
12
13
 
13
14
  sub reset {
14
15
  my $self = shift;
15
- $self->new(@_); # ugly
16
+ $self->new(@_); # ugly
16
17
  }
17
18
 
18
19
  sub addfile {
19
- my ($self, $handle) = @_;
20
+ my ( $self, $handle ) = @_;
20
21
 
21
22
  my $n;
22
23
  my $buf = "";
23
24
 
24
- while (($n = read($handle, $buf, 4*1024))) {
25
+ while ( ( $n = read( $handle, $buf, 4 * 1024 ) ) ) {
25
26
  $self->add($buf);
26
27
  }
27
- unless (defined $n) {
28
- require Carp;
29
- Carp::croak("Read failed: $!");
28
+ unless ( defined $n ) {
29
+ require Carp;
30
+ Carp::croak("Read failed: $!");
30
31
  }
31
32
 
32
33
  $self;
@@ -36,34 +37,39 @@ sub add_bits {
36
37
  my $self = shift;
37
38
  my $bits;
38
39
  my $nbits;
39
- if (@_ == 1) {
40
- my $arg = shift;
41
- $bits = pack("B*", $arg);
42
- $nbits = length($arg);
40
+ if ( @_ == 1 ) {
41
+ my $arg = shift;
42
+ $bits = pack( "B*", $arg );
43
+ $nbits = length($arg);
43
44
  }
44
45
  else {
45
- ($bits, $nbits) = @_;
46
+ ( $bits, $nbits ) = @_;
46
47
  }
47
- if (($nbits % 8) != 0) {
48
- require Carp;
49
- Carp::croak("Number of bits must be multiple of 8 for this algorithm");
48
+ if ( ( $nbits % 8 ) != 0 ) {
49
+ require Carp;
50
+ Carp::croak("Number of bits must be multiple of 8 for this algorithm");
50
51
  }
51
- return $self->add(substr($bits, 0, $nbits/8));
52
+ return $self->add( substr( $bits, 0, $nbits / 8 ) );
52
53
  }
53
54
 
54
55
  sub hexdigest {
55
56
  my $self = shift;
56
- return unpack("H*", $self->digest(@_));
57
+ return unpack( "H*", $self->digest(@_) );
57
58
  }
58
59
 
59
60
  sub b64digest {
60
61
  my $self = shift;
61
- require MIME::Base64;
62
- my $b64 = MIME::Base64::encode($self->digest(@_), "");
62
+ my $b64 = $self->base64_padded_digest;
63
63
  $b64 =~ s/=+$//;
64
64
  return $b64;
65
65
  }
66
66
 
67
+ sub base64_padded_digest {
68
+ my $self = shift;
69
+ require MIME::Base64;
70
+ return MIME::Base64::encode( $self->digest(@_), "" );
71
+ }
72
+
67
73
  1;
68
74
 
69
75
  __END__
@@ -16,7 +16,7 @@ package DynaLoader;
16
16
  # Tim.Bunce@ig.co.uk, August 1994
17
17
 
18
18
  BEGIN {
19
- $VERSION = '1.45';
19
+ $VERSION = '1.47_01';
20
20
  }
21
21
 
22
22
  use Config;
@@ -263,12 +263,15 @@ sub dl_findfile {
263
263
  foreach $name (@names) {
264
264
  my($file) = "$dir$dirsep$name";
265
265
  print STDERR " checking in $dir for $name\n" if $dl_debug;
266
- $file = ($do_expand) ? dl_expandspec($file) : (-f $file && $file);
267
- #$file = _check_file($file);
268
- if ($file) {
266
+ if ($do_expand && ($file = dl_expandspec($file))) {
267
+ push @found, $file;
268
+ next arg; # no need to look any further
269
+ }
270
+ elsif (-f $file) {
269
271
  push(@found, $file);
270
272
  next arg; # no need to look any further
271
273
  }
274
+
272
275
  }
273
276
  }
274
277
  }
@@ -1,5 +1,5 @@
1
1
  #
2
- # $Id: Encode.pm,v 3.01 2019/03/13 00:25:25 dankogai Exp $
2
+ # $Id: Encode.pm,v 3.08 2020/12/02 01:27:44 dankogai Exp $
3
3
  #
4
4
  package Encode;
5
5
  use strict;
@@ -7,7 +7,7 @@ use warnings;
7
7
  use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG};
8
8
  our $VERSION;
9
9
  BEGIN {
10
- $VERSION = sprintf "%d.%02d", q$Revision: 3.01 $ =~ /(\d+)/g;
10
+ $VERSION = sprintf "%d.%02d", q$Revision: 3.08 $ =~ /(\d+)/g;
11
11
  require XSLoader;
12
12
  XSLoader::load( __PACKAGE__, $VERSION );
13
13
  }
@@ -65,7 +65,7 @@ require Encode::Config;
65
65
  eval {
66
66
  local $SIG{__DIE__};
67
67
  local $SIG{__WARN__};
68
- local @INC = @INC;
68
+ local @INC = @INC || ();
69
69
  pop @INC if $INC[-1] eq '.';
70
70
  require Encode::ConfigLocal;
71
71
  };
@@ -10,8 +10,8 @@ use strict;
10
10
 
11
11
  use Config;
12
12
  "$Config{'archname'}-$Config{'osvers'}" eq
13
- "MSWin32-x86-multi-thread-64int-10.0.17763.529" or
14
- die "Errno architecture (MSWin32-x86-multi-thread-64int-10.0.17763.529) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
13
+ "MSWin32-x64-multi-thread-10.0.19042.746" or
14
+ die "Errno architecture (MSWin32-x64-multi-thread-10.0.19042.746) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
15
15
 
16
16
  our $VERSION = "1.30";
17
17
  $VERSION = eval $VERSION;
@@ -2525,17 +2525,17 @@ our %EXPORT_TAGS = (
2525
2525
  ETXTBSY EUSERS EWOULDBLOCK EXDEV
2526
2526
  )],
2527
2527
  WINSOCK => [qw(
2528
- WSAETOOMANYREFS WSAECONNREFUSED WSAEAFNOSUPPORT WSAEDESTADDRREQ
2529
- WSAEOPNOTSUPP WSAENETDOWN WSAEINVAL WSAEREMOTE WSAEFAULT WSAEMFILE
2530
- WSAELOOP WSAEINVALIDPROVIDER WSAEUSERS WSAEINPROGRESS WSAENAMETOOLONG
2531
- WSAEPROCLIM WSAENETRESET WSAENOPROTOOPT WSAECANCELLED
2532
- WSAESOCKTNOSUPPORT WSAECONNABORTED WSAEHOSTUNREACH WSAEBADF
2533
- WSAEPFNOSUPPORT WSAEDISCON WSAEALREADY WSAECONNRESET WSAESHUTDOWN
2534
- WSAEINTR WSAEWOULDBLOCK WSAENETUNREACH WSAETIMEDOUT WSAEPROTOTYPE
2535
- WSAEDQUOT WSAEADDRNOTAVAIL WSAENOTEMPTY WSAEMSGSIZE WSAENOBUFS
2536
- WSAESTALE WSAEACCES WSAEHOSTDOWN WSAEPROVIDERFAILEDINIT
2537
- WSAEPROTONOSUPPORT WSAENOTSOCK WSAENOMORE WSAEREFUSED WSAEISCONN
2538
- WSAEADDRINUSE WSAENOTCONN WSAEINVALIDPROCTABLE
2528
+ WSAECANCELLED WSAEINVAL WSAENETUNREACH WSAEPROTONOSUPPORT
2529
+ WSAECONNABORTED WSAENOMORE WSAEPROVIDERFAILEDINIT WSAECONNRESET
2530
+ WSAETIMEDOUT WSAEINPROGRESS WSAENOBUFS WSAEMSGSIZE WSAEISCONN
2531
+ WSAESOCKTNOSUPPORT WSAEPROTOTYPE WSAENOTEMPTY WSAEADDRINUSE
2532
+ WSAEOPNOTSUPP WSAECONNREFUSED WSAETOOMANYREFS WSAEADDRNOTAVAIL
2533
+ WSAEINTR WSAEDISCON WSAEWOULDBLOCK WSAEFAULT WSAEHOSTDOWN
2534
+ WSAEHOSTUNREACH WSAESHUTDOWN WSAEREMOTE WSAEPROCLIM WSAEALREADY
2535
+ WSAEPFNOSUPPORT WSAEINVALIDPROVIDER WSAENETRESET WSAEMFILE
2536
+ WSAEINVALIDPROCTABLE WSAENOTCONN WSAELOOP WSAENOPROTOOPT WSAENOTSOCK
2537
+ WSAEDQUOT WSAEAFNOSUPPORT WSAENAMETOOLONG WSAEDESTADDRREQ WSAEACCES
2538
+ WSAEREFUSED WSAEUSERS WSAENETDOWN WSAESTALE WSAEBADF
2539
2539
  )],
2540
2540
  );
2541
2541
 
@@ -148,7 +148,7 @@ sub heavy_export {
148
148
  if (!$export_cache->{$sym}) {
149
149
  # accumulate the non-exports
150
150
  push @carp,
151
- qq["$sym" is not exported by the $pkg module\n];
151
+ qq["$sym" is not exported by the $pkg module];
152
152
  $oops++;
153
153
  }
154
154
  }
@@ -156,7 +156,7 @@ sub heavy_export {
156
156
  }
157
157
  if ($oops) {
158
158
  require Carp;
159
- Carp::croak("@{carp}Can't continue after import errors");
159
+ Carp::croak(join("\n", @carp, "Can't continue after import errors"));
160
160
  }
161
161
  }
162
162
  else {
@@ -9,7 +9,7 @@ require 5.006;
9
9
  our $Debug = 0;
10
10
  our $ExportLevel = 0;
11
11
  our $Verbose ||= 0;
12
- our $VERSION = '5.73';
12
+ our $VERSION = '5.74';
13
13
  our (%Cache);
14
14
 
15
15
  sub as_heavy {
@@ -0,0 +1,323 @@
1
+ package ExtUtils::Command::MM;
2
+
3
+ require 5.006;
4
+
5
+ use strict;
6
+ use warnings;
7
+
8
+ require Exporter;
9
+ our @ISA = qw(Exporter);
10
+
11
+ our @EXPORT = qw(test_harness pod2man perllocal_install uninstall
12
+ warn_if_old_packlist test_s cp_nonempty);
13
+ our $VERSION = '7.58';
14
+ $VERSION =~ tr/_//d;
15
+
16
+ my $Is_VMS = $^O eq 'VMS';
17
+
18
+ sub mtime {
19
+ no warnings 'redefine';
20
+ local $@;
21
+ *mtime = (eval { require Time::HiRes } && defined &Time::HiRes::stat)
22
+ ? sub { (Time::HiRes::stat($_[0]))[9] }
23
+ : sub { ( stat($_[0]))[9] }
24
+ ;
25
+ goto &mtime;
26
+ }
27
+
28
+ =head1 NAME
29
+
30
+ ExtUtils::Command::MM - Commands for the MM's to use in Makefiles
31
+
32
+ =head1 SYNOPSIS
33
+
34
+ perl "-MExtUtils::Command::MM" -e "function" "--" arguments...
35
+
36
+
37
+ =head1 DESCRIPTION
38
+
39
+ B<FOR INTERNAL USE ONLY!> The interface is not stable.
40
+
41
+ ExtUtils::Command::MM encapsulates code which would otherwise have to
42
+ be done with large "one" liners.
43
+
44
+ Any $(FOO) used in the examples are make variables, not Perl.
45
+
46
+ =over 4
47
+
48
+ =item B<test_harness>
49
+
50
+ test_harness($verbose, @test_libs);
51
+
52
+ Runs the tests on @ARGV via Test::Harness passing through the $verbose
53
+ flag. Any @test_libs will be unshifted onto the test's @INC.
54
+
55
+ @test_libs are run in alphabetical order.
56
+
57
+ =cut
58
+
59
+ sub test_harness {
60
+ require Test::Harness;
61
+ require File::Spec;
62
+
63
+ $Test::Harness::verbose = shift;
64
+
65
+ # Because Windows doesn't do this for us and listing all the *.t files
66
+ # out on the command line can blow over its exec limit.
67
+ require ExtUtils::Command;
68
+ my @argv = ExtUtils::Command::expand_wildcards(@ARGV);
69
+
70
+ local @INC = @INC;
71
+ unshift @INC, map { File::Spec->rel2abs($_) } @_;
72
+ Test::Harness::runtests(sort { lc $a cmp lc $b } @argv);
73
+ }
74
+
75
+
76
+
77
+ =item B<pod2man>
78
+
79
+ pod2man( '--option=value',
80
+ $podfile1 => $manpage1,
81
+ $podfile2 => $manpage2,
82
+ ...
83
+ );
84
+
85
+ # or args on @ARGV
86
+
87
+ pod2man() is a function performing most of the duties of the pod2man
88
+ program. Its arguments are exactly the same as pod2man as of 5.8.0
89
+ with the addition of:
90
+
91
+ --perm_rw octal permission to set the resulting manpage to
92
+
93
+ And the removal of:
94
+
95
+ --verbose/-v
96
+ --help/-h
97
+
98
+ If no arguments are given to pod2man it will read from @ARGV.
99
+
100
+ If Pod::Man is unavailable, this function will warn and return undef.
101
+
102
+ =cut
103
+
104
+ sub pod2man {
105
+ local @ARGV = @_ ? @_ : @ARGV;
106
+
107
+ {
108
+ local $@;
109
+ if( !eval { require Pod::Man } ) {
110
+ warn "Pod::Man is not available: $@".
111
+ "Man pages will not be generated during this install.\n";
112
+ return 0;
113
+ }
114
+ }
115
+ require Getopt::Long;
116
+
117
+ # We will cheat and just use Getopt::Long. We fool it by putting
118
+ # our arguments into @ARGV. Should be safe.
119
+ my %options = ();
120
+ Getopt::Long::config ('bundling_override');
121
+ Getopt::Long::GetOptions (\%options,
122
+ 'section|s=s', 'release|r=s', 'center|c=s',
123
+ 'date|d=s', 'fixed=s', 'fixedbold=s', 'fixeditalic=s',
124
+ 'fixedbolditalic=s', 'official|o', 'quotes|q=s', 'lax|l',
125
+ 'name|n=s', 'perm_rw=i', 'utf8|u'
126
+ );
127
+ delete $options{utf8} unless $Pod::Man::VERSION >= 2.17;
128
+
129
+ # If there's no files, don't bother going further.
130
+ return 0 unless @ARGV;
131
+
132
+ # Official sets --center, but don't override things explicitly set.
133
+ if ($options{official} && !defined $options{center}) {
134
+ $options{center} = q[Perl Programmer's Reference Guide];
135
+ }
136
+
137
+ # This isn't a valid Pod::Man option and is only accepted for backwards
138
+ # compatibility.
139
+ delete $options{lax};
140
+ my $count = scalar @ARGV / 2;
141
+ my $plural = $count == 1 ? 'document' : 'documents';
142
+ print "Manifying $count pod $plural\n";
143
+
144
+ do {{ # so 'next' works
145
+ my ($pod, $man) = splice(@ARGV, 0, 2);
146
+
147
+ next if ((-e $man) &&
148
+ (mtime($man) > mtime($pod)) &&
149
+ (mtime($man) > mtime("Makefile")));
150
+
151
+ my $parser = Pod::Man->new(%options);
152
+ $parser->parse_from_file($pod, $man)
153
+ or do { warn("Could not install $man\n"); next };
154
+
155
+ if (exists $options{perm_rw}) {
156
+ chmod(oct($options{perm_rw}), $man)
157
+ or do { warn("chmod $options{perm_rw} $man: $!\n"); next };
158
+ }
159
+ }} while @ARGV;
160
+
161
+ return 1;
162
+ }
163
+
164
+
165
+ =item B<warn_if_old_packlist>
166
+
167
+ perl "-MExtUtils::Command::MM" -e warn_if_old_packlist <somefile>
168
+
169
+ Displays a warning that an old packlist file was found. Reads the
170
+ filename from @ARGV.
171
+
172
+ =cut
173
+
174
+ sub warn_if_old_packlist {
175
+ my $packlist = $ARGV[0];
176
+
177
+ return unless -f $packlist;
178
+ print <<"PACKLIST_WARNING";
179
+ WARNING: I have found an old package in
180
+ $packlist.
181
+ Please make sure the two installations are not conflicting
182
+ PACKLIST_WARNING
183
+
184
+ }
185
+
186
+
187
+ =item B<perllocal_install>
188
+
189
+ perl "-MExtUtils::Command::MM" -e perllocal_install
190
+ <type> <module name> <key> <value> ...
191
+
192
+ # VMS only, key|value pairs come on STDIN
193
+ perl "-MExtUtils::Command::MM" -e perllocal_install
194
+ <type> <module name> < <key>|<value> ...
195
+
196
+ Prints a fragment of POD suitable for appending to perllocal.pod.
197
+ Arguments are read from @ARGV.
198
+
199
+ 'type' is the type of what you're installing. Usually 'Module'.
200
+
201
+ 'module name' is simply the name of your module. (Foo::Bar)
202
+
203
+ Key/value pairs are extra information about the module. Fields include:
204
+
205
+ installed into which directory your module was out into
206
+ LINKTYPE dynamic or static linking
207
+ VERSION module version number
208
+ EXE_FILES any executables installed in a space separated
209
+ list
210
+
211
+ =cut
212
+
213
+ sub perllocal_install {
214
+ my($type, $name) = splice(@ARGV, 0, 2);
215
+
216
+ # VMS feeds args as a piped file on STDIN since it usually can't
217
+ # fit all the args on a single command line.
218
+ my @mod_info = $Is_VMS ? split /\|/, <STDIN>
219
+ : @ARGV;
220
+
221
+ my $pod;
222
+ my $time = gmtime($ENV{SOURCE_DATE_EPOCH} || time);
223
+ $pod = sprintf <<'POD', scalar($time), $type, $name, $name;
224
+ =head2 %s: C<%s> L<%s|%s>
225
+
226
+ =over 4
227
+
228
+ POD
229
+
230
+ do {
231
+ my($key, $val) = splice(@mod_info, 0, 2);
232
+
233
+ $pod .= <<POD
234
+ =item *
235
+
236
+ C<$key: $val>
237
+
238
+ POD
239
+
240
+ } while(@mod_info);
241
+
242
+ $pod .= "=back\n\n";
243
+ $pod =~ s/^ //mg;
244
+ print $pod;
245
+
246
+ return 1;
247
+ }
248
+
249
+ =item B<uninstall>
250
+
251
+ perl "-MExtUtils::Command::MM" -e uninstall <packlist>
252
+
253
+ A wrapper around ExtUtils::Install::uninstall(). Warns that
254
+ uninstallation is deprecated and doesn't actually perform the
255
+ uninstallation.
256
+
257
+ =cut
258
+
259
+ sub uninstall {
260
+ my($packlist) = shift @ARGV;
261
+
262
+ require ExtUtils::Install;
263
+
264
+ print <<'WARNING';
265
+
266
+ Uninstall is unsafe and deprecated, the uninstallation was not performed.
267
+ We will show what would have been done.
268
+
269
+ WARNING
270
+
271
+ ExtUtils::Install::uninstall($packlist, 1, 1);
272
+
273
+ print <<'WARNING';
274
+
275
+ Uninstall is unsafe and deprecated, the uninstallation was not performed.
276
+ Please check the list above carefully, there may be errors.
277
+ Remove the appropriate files manually.
278
+ Sorry for the inconvenience.
279
+
280
+ WARNING
281
+
282
+ }
283
+
284
+ =item B<test_s>
285
+
286
+ perl "-MExtUtils::Command::MM" -e test_s <file>
287
+
288
+ Tests if a file exists and is not empty (size > 0).
289
+ I<Exits> with 0 if it does, 1 if it does not.
290
+
291
+ =cut
292
+
293
+ sub test_s {
294
+ exit(-s $ARGV[0] ? 0 : 1);
295
+ }
296
+
297
+ =item B<cp_nonempty>
298
+
299
+ perl "-MExtUtils::Command::MM" -e cp_nonempty <srcfile> <dstfile> <perm>
300
+
301
+ Tests if the source file exists and is not empty (size > 0). If it is not empty
302
+ it copies it to the given destination with the given permissions.
303
+
304
+ =back
305
+
306
+ =cut
307
+
308
+ sub cp_nonempty {
309
+ my @args = @ARGV;
310
+ return 0 unless -s $args[0];
311
+ require ExtUtils::Command;
312
+ {
313
+ local @ARGV = @args[0,1];
314
+ ExtUtils::Command::cp(@ARGV);
315
+ }
316
+ {
317
+ local @ARGV = @args[2,1];
318
+ ExtUtils::Command::chmod(@ARGV);
319
+ }
320
+ }
321
+
322
+
323
+ 1;