exiftool-vendored.exe 12.80.0 → 12.82.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/bin/exiftool.exe +0 -0
- package/bin/exiftool_files/Changes +44 -0
- package/bin/exiftool_files/Licenses_Strawberry_Perl.zip +0 -0
- package/bin/exiftool_files/README +3 -2
- package/bin/exiftool_files/exiftool.pl +36 -14
- package/bin/exiftool_files/lib/Archive/Zip/Archive.pm +399 -65
- package/bin/exiftool_files/lib/Archive/Zip/DirectoryMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/FileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/Member.pm +499 -195
- package/bin/exiftool_files/lib/Archive/Zip/NewFileMember.pm +1 -1
- package/bin/exiftool_files/lib/Archive/Zip/StringMember.pm +2 -2
- package/bin/exiftool_files/lib/Archive/Zip/ZipFileMember.pm +79 -20
- package/bin/exiftool_files/lib/Archive/Zip.pm +179 -29
- package/bin/exiftool_files/lib/AutoLoader.pm +453 -0
- package/bin/exiftool_files/lib/B/Deparse.pm +209 -137
- package/bin/exiftool_files/lib/B.pm +1 -1
- package/bin/exiftool_files/lib/Benchmark.pm +1123 -0
- package/bin/exiftool_files/lib/Class/Struct.pm +2 -2
- package/bin/exiftool_files/lib/Compress/Raw/Bzip2.pm +14 -9
- package/bin/exiftool_files/lib/Compress/Raw/Lzma.pm +982 -0
- package/bin/exiftool_files/lib/Compress/Raw/Zlib.pm +91 -86
- package/bin/exiftool_files/lib/Compress/Zlib.pm +105 -100
- package/bin/exiftool_files/lib/Config.pm +9 -9
- package/bin/exiftool_files/lib/Config_heavy.pl +36 -33
- package/bin/exiftool_files/lib/CryptX.pm +2 -82
- package/bin/exiftool_files/lib/Data/Dumper.pm +2 -2
- package/bin/exiftool_files/lib/Digest/MD5.pm +12 -9
- package/bin/exiftool_files/lib/Digest/Perl/MD5.pm +1 -191
- package/bin/exiftool_files/lib/Digest/base.pm +26 -20
- package/bin/exiftool_files/lib/DynaLoader.pm +7 -4
- package/bin/exiftool_files/lib/Encode.pm +3 -3
- package/bin/exiftool_files/lib/Errno.pm +13 -13
- package/bin/exiftool_files/lib/Exporter/Heavy.pm +2 -2
- package/bin/exiftool_files/lib/Exporter.pm +1 -1
- package/bin/exiftool_files/lib/ExtUtils/Command/MM.pm +323 -0
- package/bin/exiftool_files/lib/ExtUtils/Command.pm +382 -0
- package/bin/exiftool_files/lib/File/Find.pm +1 -1
- package/bin/exiftool_files/lib/File/Glob.pm +1 -8
- package/bin/exiftool_files/lib/File/GlobMapper.pm +2 -2
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Carbon.pm +2 -40
- package/bin/exiftool_files/lib/File/HomeDir/Darwin/Cocoa.pm +2 -34
- package/bin/exiftool_files/lib/File/HomeDir/Darwin.pm +2 -28
- package/bin/exiftool_files/lib/File/HomeDir/Driver.pm +2 -35
- package/bin/exiftool_files/lib/File/HomeDir/FreeDesktop.pm +2 -62
- package/bin/exiftool_files/lib/File/HomeDir/MacOS9.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Test.pm +2 -43
- package/bin/exiftool_files/lib/File/HomeDir/Unix.pm +2 -53
- package/bin/exiftool_files/lib/File/HomeDir/Windows.pm +2 -69
- package/bin/exiftool_files/lib/File/HomeDir.pm +5 -416
- package/bin/exiftool_files/lib/File/Path.pm +3 -3
- package/bin/exiftool_files/lib/File/Spec/Win32.pm +2 -2
- package/bin/exiftool_files/lib/File/Temp.pm +70 -35
- package/bin/exiftool_files/lib/File/Which.pm +1 -240
- package/bin/exiftool_files/lib/File/stat.pm +3 -2
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Bzip2.pm +16 -17
- package/bin/exiftool_files/lib/IO/Compress/Adapter/Deflate.pm +19 -20
- package/bin/exiftool_files/lib/IO/Compress/Base/Common.pm +5 -5
- package/bin/exiftool_files/lib/IO/Compress/Base.pm +35 -26
- package/bin/exiftool_files/lib/IO/Compress/Brotli.pm +159 -0
- package/bin/exiftool_files/lib/IO/Compress/Bzip2.pm +50 -25
- package/bin/exiftool_files/lib/IO/Compress/Gzip/Constants.pm +6 -6
- package/bin/exiftool_files/lib/IO/Compress/Gzip.pm +58 -32
- package/bin/exiftool_files/lib/IO/Compress/RawDeflate.pm +63 -38
- package/bin/exiftool_files/lib/IO/Compress/Zlib/Extra.pm +20 -20
- package/bin/exiftool_files/lib/IO/Dir.pm +1 -1
- package/bin/exiftool_files/lib/IO/File.pm +1 -1
- package/bin/exiftool_files/lib/IO/Handle.pm +1 -21
- package/bin/exiftool_files/lib/IO/Pipe.pm +1 -1
- package/bin/exiftool_files/lib/IO/Seekable.pm +1 -1
- package/bin/exiftool_files/lib/IO/Select.pm +16 -2
- package/bin/exiftool_files/lib/IO/Socket/INET.pm +14 -9
- package/bin/exiftool_files/lib/IO/Socket/UNIX.pm +17 -1
- package/bin/exiftool_files/lib/IO/Socket.pm +474 -126
- package/bin/exiftool_files/lib/IO/String.pm +425 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Adapter/Inflate.pm +13 -14
- package/bin/exiftool_files/lib/IO/Uncompress/Base.pm +142 -132
- package/bin/exiftool_files/lib/IO/Uncompress/Brotli.pm +119 -0
- package/bin/exiftool_files/lib/IO/Uncompress/Gunzip.pm +43 -37
- package/bin/exiftool_files/lib/IO/Uncompress/RawInflate.pm +49 -43
- package/bin/exiftool_files/lib/IO.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/BuildTagLookup.pm +44 -31
- package/bin/exiftool_files/lib/Image/ExifTool/CanonVRD.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/FujiFilm.pm +20 -7
- package/bin/exiftool_files/lib/Image/ExifTool/GM.pm +543 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Geolocation.pm +332 -149
- package/bin/exiftool_files/lib/Image/ExifTool/Geotag.pm +9 -4
- package/bin/exiftool_files/lib/Image/ExifTool/M2TS.pm +32 -4
- package/bin/exiftool_files/lib/Image/ExifTool/MakerNotes.pm +2 -2
- package/bin/exiftool_files/lib/Image/ExifTool/Microsoft.pm +1 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Nikon.pm +331 -22
- package/bin/exiftool_files/lib/Image/ExifTool/NikonCustom.pm +55 -1
- package/bin/exiftool_files/lib/Image/ExifTool/Olympus.pm +1 -0
- package/bin/exiftool_files/lib/Image/ExifTool/OpenEXR.pm +21 -3
- package/bin/exiftool_files/lib/Image/ExifTool/PNG.pm +3 -3
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTime.pm +40 -24
- package/bin/exiftool_files/lib/Image/ExifTool/QuickTimeStream.pl +61 -30
- package/bin/exiftool_files/lib/Image/ExifTool/README +2 -0
- package/bin/exiftool_files/lib/Image/ExifTool/Sony.pm +1 -1
- package/bin/exiftool_files/lib/Image/ExifTool/TagLookup.pm +4815 -4775
- package/bin/exiftool_files/lib/Image/ExifTool/TagNames.pod +931 -617
- package/bin/exiftool_files/lib/Image/ExifTool/WriteQuickTime.pl +30 -8
- package/bin/exiftool_files/lib/Image/ExifTool/Writer.pl +10 -4
- package/bin/exiftool_files/lib/Image/ExifTool/XMP.pm +4 -2
- package/bin/exiftool_files/lib/Image/ExifTool.pm +77 -41
- package/bin/exiftool_files/lib/Image/ExifTool.pod +24 -11
- package/bin/exiftool_files/lib/List/Util.pm +97 -8
- package/bin/exiftool_files/lib/MIME/Base64.pm +5 -5
- package/bin/exiftool_files/lib/MIME/Charset/_Compat.pm +106 -0
- package/bin/exiftool_files/lib/MIME/Charset.pm +1303 -0
- package/bin/exiftool_files/lib/Math/BigFloat.pm +444 -27
- package/bin/exiftool_files/lib/Math/BigInt/Calc.pm +296 -313
- package/bin/exiftool_files/lib/Math/BigInt/FastCalc.pm +1 -1
- package/bin/exiftool_files/lib/Math/BigInt/GMP.pm +2 -115
- package/bin/exiftool_files/lib/Math/BigInt/LTM.pm +2 -24
- package/bin/exiftool_files/lib/Math/BigInt/Lib.pm +61 -32
- package/bin/exiftool_files/lib/Math/BigInt.pm +292 -107
- package/bin/exiftool_files/lib/POSIX.pm +1 -1
- package/bin/exiftool_files/lib/PerlIO/scalar.pm +41 -0
- package/bin/exiftool_files/lib/PerlIO.pm +397 -0
- package/bin/exiftool_files/lib/Portable/CPAN.pm +94 -94
- package/bin/exiftool_files/lib/Portable/Config.pm +94 -94
- package/bin/exiftool_files/lib/Portable/FileSpec.pm +180 -180
- package/bin/exiftool_files/lib/Portable/HomeDir.pm +110 -110
- package/bin/exiftool_files/lib/Portable/LoadYaml.pm +430 -430
- package/bin/exiftool_files/lib/Portable/minicpan.pm +55 -55
- package/bin/exiftool_files/lib/Portable.pm +246 -320
- package/bin/exiftool_files/lib/Scalar/Util.pm +9 -4
- package/bin/exiftool_files/lib/Socket.pm +16 -12
- package/bin/exiftool_files/lib/Storable.pm +1444 -1441
- package/bin/exiftool_files/lib/TAP/Base.pm +133 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Base.pm +467 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Color.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/ParallelSession.pm +201 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console/Session.pm +205 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Console.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File/Session.pm +95 -0
- package/bin/exiftool_files/lib/TAP/Formatter/File.pm +56 -0
- package/bin/exiftool_files/lib/TAP/Formatter/Session.pm +220 -0
- package/bin/exiftool_files/lib/TAP/Harness/Beyond.pod +426 -0
- package/bin/exiftool_files/lib/TAP/Harness/Env.pm +215 -0
- package/bin/exiftool_files/lib/TAP/Harness.pm +1054 -0
- package/bin/exiftool_files/lib/TAP/Object.pm +155 -0
- package/bin/exiftool_files/lib/TAP/Parser/Aggregator.pm +414 -0
- package/bin/exiftool_files/lib/TAP/Parser/Grammar.pm +584 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Array.pm +100 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Process.pm +378 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator/Stream.pm +116 -0
- package/bin/exiftool_files/lib/TAP/Parser/Iterator.pm +162 -0
- package/bin/exiftool_files/lib/TAP/Parser/IteratorFactory.pm +339 -0
- package/bin/exiftool_files/lib/TAP/Parser/Multiplexer.pm +194 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Bailout.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Comment.pm +60 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Plan.pm +119 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Pragma.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Test.pm +271 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Unknown.pm +48 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/Version.pm +62 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result/YAML.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Result.pm +297 -0
- package/bin/exiftool_files/lib/TAP/Parser/ResultFactory.pm +183 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Job.pm +127 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler/Spinner.pm +61 -0
- package/bin/exiftool_files/lib/TAP/Parser/Scheduler.pm +448 -0
- package/bin/exiftool_files/lib/TAP/Parser/Source.pm +381 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Executable.pm +184 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/File.pm +136 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Handle.pm +124 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/Perl.pm +370 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler/RawTAP.pm +130 -0
- package/bin/exiftool_files/lib/TAP/Parser/SourceHandler.pm +191 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Reader.pm +332 -0
- package/bin/exiftool_files/lib/TAP/Parser/YAMLish/Writer.pm +254 -0
- package/bin/exiftool_files/lib/TAP/Parser.pm +1931 -0
- package/bin/exiftool_files/lib/Test/Builder/Formatter.pm +107 -0
- package/bin/exiftool_files/lib/Test/Builder/IO/Scalar.pm +659 -0
- package/bin/exiftool_files/lib/Test/Builder/Module.pm +182 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester/Color.pm +51 -0
- package/bin/exiftool_files/lib/Test/Builder/Tester.pm +675 -0
- package/bin/exiftool_files/lib/Test/Builder/TodoDiag.pm +68 -0
- package/bin/exiftool_files/lib/Test/Builder.pm +2653 -0
- package/bin/exiftool_files/lib/Test/Harness.pm +618 -0
- package/bin/exiftool_files/lib/Test/More.pm +1997 -0
- package/bin/exiftool_files/lib/Test/Simple.pm +220 -0
- package/bin/exiftool_files/lib/Test/Tester/Capture.pm +241 -0
- package/bin/exiftool_files/lib/Test/Tester/CaptureRunner.pm +79 -0
- package/bin/exiftool_files/lib/Test/Tester/Delegate.pm +45 -0
- package/bin/exiftool_files/lib/Test/Tester.pm +695 -0
- package/bin/exiftool_files/lib/Test/Tutorial.pod +618 -0
- package/bin/exiftool_files/lib/Test/use/ok.pm +64 -0
- package/bin/exiftool_files/lib/Text/ParseWords.pm +303 -0
- package/bin/exiftool_files/lib/Tie/StdHandle.pm +2 -2
- package/bin/exiftool_files/lib/Time/HiRes.pm +73 -68
- package/bin/exiftool_files/lib/Time/Local.pm +82 -35
- package/bin/exiftool_files/lib/Time/Piece.pm +19 -4
- package/bin/exiftool_files/lib/Time/Seconds.pm +1 -1
- package/bin/exiftool_files/lib/UNIVERSAL.pm +203 -0
- package/bin/exiftool_files/lib/Unicode/GCString.pm +60 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak/Constants.pm +68 -0
- package/bin/exiftool_files/lib/Unicode/LineBreak.pm +248 -0
- package/bin/exiftool_files/lib/Win32/API/Struct.pm +1 -177
- package/bin/exiftool_files/lib/Win32/API/Type.pm +1 -100
- package/bin/exiftool_files/lib/Win32/API.pm +1 -830
- package/bin/exiftool_files/lib/Win32/FindFile.pm +2 -123
- package/bin/exiftool_files/lib/Win32.pm +213 -89
- package/bin/exiftool_files/lib/Win32API/File.pm +1 -1
- package/bin/exiftool_files/lib/auto/B/B.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Bzip2/Bzip2.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/Lzma.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Lzma/autosplit.ix +3 -0
- package/bin/exiftool_files/lib/auto/Compress/Raw/Zlib/Zlib.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/CryptX/CryptX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Cwd/Cwd.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Data/Dumper/Dumper.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/MD5/MD5.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Digest/SHA/SHA.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Encode/Encode.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Fcntl/Fcntl.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/File/Glob/Glob.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/Compress/Brotli/Brotli.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/IO/IO.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/List/Util/Util.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/MIME/Base64/Base64.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/FastCalc/FastCalc.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Math/BigInt/GMP/GMP.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/POSIX/POSIX.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/PerlIO/scalar/scalar.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Socket/Socket.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Storable/Storable.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/HiRes/HiRes.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Time/Piece/Piece.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Unicode/LineBreak/LineBreak.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/API/API.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/FindFile/FindFile.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32/Win32.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/Win32API/File/File.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/mro/mro.xs.dll +0 -0
- package/bin/exiftool_files/lib/auto/re/re.xs.dll +0 -0
- package/bin/exiftool_files/lib/feature.pm +49 -17
- package/bin/exiftool_files/lib/mro.pm +4 -20
- package/bin/exiftool_files/lib/overload.pm +15 -15
- package/bin/exiftool_files/lib/parent.pm +10 -2
- package/bin/exiftool_files/lib/re.pm +91 -33
- package/bin/exiftool_files/lib/warnings.pm +17 -6
- package/bin/exiftool_files/libgcc_s_seh-1.dll +0 -0
- package/bin/exiftool_files/liblzma-5__.dll +0 -0
- package/bin/exiftool_files/libstdc++-6.dll +0 -0
- package/bin/exiftool_files/libwinpthread-1.dll +0 -0
- package/bin/exiftool_files/perl.exe +0 -0
- package/bin/exiftool_files/perl532.dll +0 -0
- package/package.json +7 -5
- package/bin/exiftool_files/libgcc_s_dw2-1.dll +0 -0
- package/bin/exiftool_files/perl530.dll +0 -0
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
package Portable::minicpan;
|
|
2
|
-
|
|
3
|
-
use 5.008;
|
|
4
|
-
use strict;
|
|
5
|
-
use warnings;
|
|
6
|
-
use Portable::FileSpec;
|
|
7
|
-
|
|
8
|
-
our $VERSION = '1.
|
|
9
|
-
|
|
10
|
-
#####################################################################
|
|
11
|
-
# Portable Driver API
|
|
12
|
-
|
|
13
|
-
sub new {
|
|
14
|
-
my $class = shift;
|
|
15
|
-
my $parent = shift;
|
|
16
|
-
unless ( Portable::_HASH($parent->portable_minicpan) ) {
|
|
17
|
-
die('Missing or invalid minicpan key in portable.perl');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
# Create the object
|
|
21
|
-
my $self = bless { }, $class;
|
|
22
|
-
|
|
23
|
-
# Map paths to absolute paths
|
|
24
|
-
my $minicpan = $parent->portable_minicpan;
|
|
25
|
-
my $root = $parent->dist_root;
|
|
26
|
-
foreach my $key ( qw{ local } ) {
|
|
27
|
-
unless (
|
|
28
|
-
defined $minicpan->{$key}
|
|
29
|
-
and
|
|
30
|
-
length $minicpan->{$key}
|
|
31
|
-
) {
|
|
32
|
-
$self->{$key} = $minicpan->{$key};
|
|
33
|
-
next;
|
|
34
|
-
}
|
|
35
|
-
$self->{$key} = Portable::FileSpec::catdir(
|
|
36
|
-
$root, split /\//, $minicpan->{$key}
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
# Add the literal params
|
|
41
|
-
$self->{remote} = $minicpan->{remote};
|
|
42
|
-
$self->{quiet} = $minicpan->{quiet};
|
|
43
|
-
$self->{force} = $minicpan->{force};
|
|
44
|
-
$self->{offline} = $minicpan->{offline};
|
|
45
|
-
$self->{also_mirror} = $minicpan->{also_mirror};
|
|
46
|
-
$self->{module_filters} = $minicpan->{module_filters};
|
|
47
|
-
$self->{path_filters} = $minicpan->{path_filters};
|
|
48
|
-
$self->{skip_cleanup} = $minicpan->{skip_cleanup};
|
|
49
|
-
$self->{skip_perl} = $minicpan->{skip_perl};
|
|
50
|
-
$self->{no_conn_cache} = $minicpan->{no_conn_cache};
|
|
51
|
-
|
|
52
|
-
return $self;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
1;
|
|
1
|
+
package Portable::minicpan;
|
|
2
|
+
|
|
3
|
+
use 5.008;
|
|
4
|
+
use strict;
|
|
5
|
+
use warnings;
|
|
6
|
+
use Portable::FileSpec;
|
|
7
|
+
|
|
8
|
+
our $VERSION = '1.23';
|
|
9
|
+
|
|
10
|
+
#####################################################################
|
|
11
|
+
# Portable Driver API
|
|
12
|
+
|
|
13
|
+
sub new {
|
|
14
|
+
my $class = shift;
|
|
15
|
+
my $parent = shift;
|
|
16
|
+
unless ( Portable::_HASH($parent->portable_minicpan) ) {
|
|
17
|
+
die('Missing or invalid minicpan key in portable.perl');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
# Create the object
|
|
21
|
+
my $self = bless { }, $class;
|
|
22
|
+
|
|
23
|
+
# Map paths to absolute paths
|
|
24
|
+
my $minicpan = $parent->portable_minicpan;
|
|
25
|
+
my $root = $parent->dist_root;
|
|
26
|
+
foreach my $key ( qw{ local } ) {
|
|
27
|
+
unless (
|
|
28
|
+
defined $minicpan->{$key}
|
|
29
|
+
and
|
|
30
|
+
length $minicpan->{$key}
|
|
31
|
+
) {
|
|
32
|
+
$self->{$key} = $minicpan->{$key};
|
|
33
|
+
next;
|
|
34
|
+
}
|
|
35
|
+
$self->{$key} = Portable::FileSpec::catdir(
|
|
36
|
+
$root, split /\//, $minicpan->{$key}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
# Add the literal params
|
|
41
|
+
$self->{remote} = $minicpan->{remote};
|
|
42
|
+
$self->{quiet} = $minicpan->{quiet};
|
|
43
|
+
$self->{force} = $minicpan->{force};
|
|
44
|
+
$self->{offline} = $minicpan->{offline};
|
|
45
|
+
$self->{also_mirror} = $minicpan->{also_mirror};
|
|
46
|
+
$self->{module_filters} = $minicpan->{module_filters};
|
|
47
|
+
$self->{path_filters} = $minicpan->{path_filters};
|
|
48
|
+
$self->{skip_cleanup} = $minicpan->{skip_cleanup};
|
|
49
|
+
$self->{skip_perl} = $minicpan->{skip_perl};
|
|
50
|
+
$self->{no_conn_cache} = $minicpan->{no_conn_cache};
|
|
51
|
+
|
|
52
|
+
return $self;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
1;
|
|
@@ -1,320 +1,246 @@
|
|
|
1
|
-
package Portable;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
=
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if ( $
|
|
111
|
-
|
|
112
|
-
$
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
#
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
my $
|
|
136
|
-
|
|
137
|
-
#
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
#
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
$
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
$_[0]->{perlpath};
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
sub portable_cpan {
|
|
251
|
-
$_[0]->{portable}->{CPAN};
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
sub portable_config {
|
|
255
|
-
$_[0]->{portable}->{Config};
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
sub portable_homedir {
|
|
259
|
-
$_[0]->{portable}->{HomeDir};
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
sub portable_minicpan {
|
|
263
|
-
$_[0]->{portable}->{minicpan};
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
sub portable_env {
|
|
267
|
-
$_[0]->{portable}->{Env};
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
sub config {
|
|
271
|
-
$_[0]->{Config};
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
sub cpan {
|
|
275
|
-
$_[0]->{CPAN};
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
sub homedir {
|
|
279
|
-
$_[0]->{HomeDir};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
sub minicpan {
|
|
283
|
-
$_[0]->{minicpan};
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
sub env {
|
|
287
|
-
$_[0]->{Env};
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
1;
|
|
291
|
-
|
|
292
|
-
=pod
|
|
293
|
-
|
|
294
|
-
=head1 SUPPORT
|
|
295
|
-
|
|
296
|
-
Bugs should be reported via the CPAN bug tracker.
|
|
297
|
-
|
|
298
|
-
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Portable>
|
|
299
|
-
|
|
300
|
-
For other issues, or commercial support, contact the author.
|
|
301
|
-
|
|
302
|
-
=head1 AUTHOR
|
|
303
|
-
|
|
304
|
-
Adam Kennedy E<lt>adamk@cpan.orgE<gt>
|
|
305
|
-
|
|
306
|
-
=head1 SEE ALSO
|
|
307
|
-
|
|
308
|
-
L<http://win32.perl.org/>
|
|
309
|
-
|
|
310
|
-
=head1 COPYRIGHT
|
|
311
|
-
|
|
312
|
-
Copyright 2008 - 2011 Adam Kennedy.
|
|
313
|
-
|
|
314
|
-
This program is free software; you can redistribute
|
|
315
|
-
it and/or modify it under the same terms as Perl itself.
|
|
316
|
-
|
|
317
|
-
The full text of the license can be found in the
|
|
318
|
-
LICENSE file included with this module.
|
|
319
|
-
|
|
320
|
-
=cut
|
|
1
|
+
package Portable;
|
|
2
|
+
|
|
3
|
+
#line 50
|
|
4
|
+
|
|
5
|
+
use 5.008;
|
|
6
|
+
use strict;
|
|
7
|
+
use warnings;
|
|
8
|
+
use Portable::LoadYaml;
|
|
9
|
+
use Portable::FileSpec;
|
|
10
|
+
|
|
11
|
+
our $VERSION = '1.23';
|
|
12
|
+
|
|
13
|
+
# This variable is provided exclusively for the
|
|
14
|
+
# use of test scripts.
|
|
15
|
+
our $FAKE_PERL;
|
|
16
|
+
|
|
17
|
+
# Globally-accessible flag to see if Portable is enabled.
|
|
18
|
+
# Defaults to undef, because if Portable.pm is not loaded
|
|
19
|
+
# AT ALL, $Portable::ENABLED returns undef anyways.
|
|
20
|
+
our $ENABLED = undef;
|
|
21
|
+
|
|
22
|
+
# Param-checking
|
|
23
|
+
sub _STRING ($) {
|
|
24
|
+
(defined $_[0] and ! ref $_[0] and length($_[0])) ? $_[0] : undef;
|
|
25
|
+
}
|
|
26
|
+
sub _HASH ($) {
|
|
27
|
+
(ref $_[0] eq 'HASH' and scalar %{$_[0]}) ? $_[0] : undef;
|
|
28
|
+
}
|
|
29
|
+
sub _ARRAY ($) {
|
|
30
|
+
(ref $_[0] eq 'ARRAY' and @{$_[0]}) ? $_[0] : undef;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Package variables
|
|
34
|
+
my %applied;
|
|
35
|
+
my $cache;
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
#####################################################################
|
|
42
|
+
# Pragma/Import Interface
|
|
43
|
+
|
|
44
|
+
sub import {
|
|
45
|
+
my $class = shift;
|
|
46
|
+
$class->apply( @_ ? @_ : qw{ Config CPAN } );
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
sub apply {
|
|
50
|
+
# default %applied;
|
|
51
|
+
my $class = shift;
|
|
52
|
+
my $self = $class->default;
|
|
53
|
+
my %apply = map { $_ => 1 } @_;
|
|
54
|
+
if ( $apply{Config} and ! $applied{Config} ) {
|
|
55
|
+
$self->config->apply($self);
|
|
56
|
+
$applied{Config} = 1;
|
|
57
|
+
$ENABLED = 1;
|
|
58
|
+
}
|
|
59
|
+
if ( $apply{CPAN} and ! $applied{CPAN} and $self->cpan ) {
|
|
60
|
+
$self->cpan->apply($self);
|
|
61
|
+
$applied{CPAN} = 1;
|
|
62
|
+
$ENABLED = 1;
|
|
63
|
+
}
|
|
64
|
+
if ( $apply{HomeDir} and ! $applied{HomeDir} and $self->homedir ) {
|
|
65
|
+
$self->homedir->apply($self);
|
|
66
|
+
$applied{HomeDir} = 1;
|
|
67
|
+
$ENABLED = 1;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
# We don't need to do anything for CPAN::Mini.
|
|
71
|
+
# It will load us instead (I think)
|
|
72
|
+
|
|
73
|
+
return 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
sub applied {
|
|
77
|
+
$applied{$_[1]};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
#####################################################################
|
|
85
|
+
# Constructors
|
|
86
|
+
|
|
87
|
+
sub new {
|
|
88
|
+
my $class = shift;
|
|
89
|
+
my $self = bless { @_ }, $class;
|
|
90
|
+
|
|
91
|
+
# Param checking
|
|
92
|
+
unless ( exists $self->{dist_volume} ) {
|
|
93
|
+
die('Missing or invalid dist_volume param');
|
|
94
|
+
}
|
|
95
|
+
unless ( _STRING($self->dist_dirs) ) {
|
|
96
|
+
die('Missing or invalid dist_dirs param');
|
|
97
|
+
}
|
|
98
|
+
unless ( _STRING($self->dist_root) ) {
|
|
99
|
+
die('Missing or invalid dist_root param');
|
|
100
|
+
}
|
|
101
|
+
unless ( _HASH($self->{portable}) ) {
|
|
102
|
+
die('Missing or invalid portable param');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
# Compulsory support for Config.pm
|
|
106
|
+
require Portable::Config;
|
|
107
|
+
$self->{Config} = Portable::Config->new( $self );
|
|
108
|
+
|
|
109
|
+
# Optional support for CPAN::Config
|
|
110
|
+
if ( $self->portable_cpan ) {
|
|
111
|
+
require Portable::CPAN;
|
|
112
|
+
$self->{CPAN} = Portable::CPAN->new( $self );
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
# Optional support for File::HomeDir
|
|
116
|
+
if ( $self->portable_homedir ) {
|
|
117
|
+
require Portable::HomeDir;
|
|
118
|
+
$self->{HomeDir} = Portable::HomeDir->new( $self );
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
# Optional support for CPAN::Mini
|
|
122
|
+
if ( $self->portable_minicpan ) {
|
|
123
|
+
require Portable::minicpan;
|
|
124
|
+
$self->{minicpan} = Portable::minicpan->new( $self );
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return $self;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
sub default {
|
|
131
|
+
# state $cache;
|
|
132
|
+
return $cache if $cache;
|
|
133
|
+
|
|
134
|
+
# Get the perl executable location
|
|
135
|
+
my $perlpath = ($ENV{HARNESS_ACTIVE} and $FAKE_PERL) ? $FAKE_PERL : $^X;
|
|
136
|
+
|
|
137
|
+
# The path to Perl has a localized path.
|
|
138
|
+
# G:\\strawberry\\perl\\bin\\perl.exe
|
|
139
|
+
# Split it up, and search upwards to try and locate the
|
|
140
|
+
# portable.perl file in the distribution root.
|
|
141
|
+
my ($dist_volume, $d, $f) = Portable::FileSpec::splitpath($perlpath);
|
|
142
|
+
my @d = Portable::FileSpec::splitdir($d);
|
|
143
|
+
pop @d if @d > 0 && $d[-1] eq '';
|
|
144
|
+
my @tmp = grep {
|
|
145
|
+
-f Portable::FileSpec::catpath( $dist_volume, $_, 'portable.perl' )
|
|
146
|
+
}
|
|
147
|
+
map {
|
|
148
|
+
Portable::FileSpec::catdir(@d[0 .. $_])
|
|
149
|
+
} reverse ( 0 .. $#d );
|
|
150
|
+
my $dist_dirs = $tmp[0];
|
|
151
|
+
unless ( defined $dist_dirs ) {
|
|
152
|
+
die("Failed to find the portable.perl file");
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
# Derive the main paths from the plain dirs
|
|
156
|
+
my $dist_root = Portable::FileSpec::catpath($dist_volume, $dist_dirs, '' );
|
|
157
|
+
my $conf = Portable::FileSpec::catpath($dist_volume, $dist_dirs, 'portable.perl' );
|
|
158
|
+
|
|
159
|
+
# Load the YAML file
|
|
160
|
+
my $portable = Portable::LoadYaml::load_file( $conf );
|
|
161
|
+
unless ( _HASH($portable) ) {
|
|
162
|
+
die("Missing or invalid portable.perl file");
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
# Hand off to the main constructor,
|
|
166
|
+
# cache the result and return it
|
|
167
|
+
$cache = __PACKAGE__->new(
|
|
168
|
+
dist_volume => $dist_volume,
|
|
169
|
+
dist_dirs => $dist_dirs,
|
|
170
|
+
dist_root => $dist_root,
|
|
171
|
+
conf => $conf,
|
|
172
|
+
perlpath => $perlpath,
|
|
173
|
+
portable => $portable,
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
#####################################################################
|
|
182
|
+
# Configuration Accessors
|
|
183
|
+
|
|
184
|
+
sub dist_volume {
|
|
185
|
+
$_[0]->{dist_volume};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
sub dist_dirs {
|
|
189
|
+
$_[0]->{dist_dirs};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
sub dist_root {
|
|
193
|
+
$_[0]->{dist_root};
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
sub conf {
|
|
197
|
+
$_[0]->{conf};
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
sub perlpath {
|
|
201
|
+
$_[0]->{perlpath};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
sub portable_cpan {
|
|
205
|
+
$_[0]->{portable}->{CPAN};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
sub portable_config {
|
|
209
|
+
$_[0]->{portable}->{Config};
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
sub portable_homedir {
|
|
213
|
+
$_[0]->{portable}->{HomeDir};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
sub portable_minicpan {
|
|
217
|
+
$_[0]->{portable}->{minicpan};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
sub portable_env {
|
|
221
|
+
$_[0]->{portable}->{Env};
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
sub config {
|
|
225
|
+
$_[0]->{Config};
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
sub cpan {
|
|
229
|
+
$_[0]->{CPAN};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
sub homedir {
|
|
233
|
+
$_[0]->{HomeDir};
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
sub minicpan {
|
|
237
|
+
$_[0]->{minicpan};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
sub env {
|
|
241
|
+
$_[0]->{Env};
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
1;
|
|
245
|
+
|
|
246
|
+
#line 309
|