diff --git a/vendor/LeOS/config/common.mk b/vendor/LeOS/config/common.mk
deleted file mode 100644
index 36c61656..00000000
--- a/vendor/LeOS/config/common.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-# Overlay
-PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += vendor/ponces/overlay
-PRODUCT_PACKAGE_OVERLAYS += \
- vendor/ponces/overlay/common
-
-ifneq ($(TARGET_BUILD_VARIANT),eng)
-# Disable extra StrictMode features on all non-engineering builds
-PRODUCT_SYSTEM_PROPERTIES += persist.sys.strictmode.disable=true
-endif
-
-# Enable SIP+VoIP on all targets
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/android.software.sip.voip.xml
-
-# Face Unlock
-TARGET_FACE_UNLOCK_SUPPORTED ?= $(TARGET_SUPPORTS_64_BIT_APPS)
-
-ifeq ($(TARGET_FACE_UNLOCK_SUPPORTED),true)
-PRODUCT_PACKAGES += \
- ParanoidSense
-
-PRODUCT_SYSTEM_EXT_PROPERTIES += \
- ro.face.sense_service=true
-
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.biometrics.face.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/permissions/android.hardware.biometrics.face.xml
-endif
-
-# Enforce privapp-permissions whitelist
-PRODUCT_SYSTEM_PROPERTIES += \
- ro.control_privapp_permissions=enforce
-
-# Power whitelist
-PRODUCT_COPY_FILES += \
- vendor/ponces/config/permissions/custom-power-whitelist.xml:system/etc/sysconfig/custom-power-whitelist.xml
-
-# Do not include art debug targets
-PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false
-
-# Strip the local variable table and the local variable type table to reduce
-# the size of the system image. This has no bearing on stack traces, but will
-# leave less information available via JDWP.
-PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true
-
-# One Handed mode
-PRODUCT_PRODUCT_PROPERTIES += \
- ro.support_one_handed_mode?=true
-
-# The set of packages we want to force 'speed' compilation on.
-PRODUCT_DEXPREOPT_SPEED_APPS += \
- TrebuchetQuickStep \
- Settings \
- SystemUI
-
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
- dalvik.vm.systemuicompilerfilter=speed
-
-# Enable lockscreen live wallpaper
-PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
- persist.wm.debug.lockscreen_live_wallpaper=true
-
-# Use gestures by default
-PRODUCT_PRODUCT_PROPERTIES += \
- ro.boot.vendor.overlay.theme=com.android.internal.systemui.navbar.gestural
-
-# Packages
-$(call inherit-product, vendor/ponces/config/packages.mk)
-
-# RRO Overlays
-$(call inherit-product, vendor/ponces/config/rro_overlays.mk)
diff --git a/vendor/LeOS/config/packages.mk b/vendor/LeOS/config/packages.mk
deleted file mode 100644
index 8407aaa6..00000000
--- a/vendor/LeOS/config/packages.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-# Required packages
-PRODUCT_PACKAGES += \
- Stk \
- ThemePicker \
- ThemesStub
-
-# Trebuchet
-PRODUCT_PACKAGES += \
- TrebuchetQuickStep
-
diff --git a/vendor/LeOS/config/rro_overlays.mk b/vendor/LeOS/config/rro_overlays.mk
deleted file mode 100644
index ba403bd2..00000000
--- a/vendor/LeOS/config/rro_overlays.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-# RRO Overlays
-PRODUCT_PACKAGES += \
- CertificationOverlay \
- ConfigOverlay \
- DocumentsUIOverlay \
- FrameworksOverlay \
- Launcher3Overlay \
- SettingsProviderOverlay \
- SystemUIOverlay \
- WifiOverlay
diff --git a/vendor/LeOS/overlay/common/frameworks/base/libs/WindowManager/Shell/res/values/config.xml b/vendor/LeOS/overlay/common/frameworks/base/libs/WindowManager/Shell/res/values/config.xml
deleted file mode 100644
index 5db916dd..00000000
--- a/vendor/LeOS/overlay/common/frameworks/base/libs/WindowManager/Shell/res/values/config.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
- true
-
diff --git a/vendor/LeOS/overlay/common/packages/apps/Settings/res/values/config.xml b/vendor/LeOS/overlay/common/packages/apps/Settings/res/values/config.xml
deleted file mode 100644
index 5e22d2a6..00000000
--- a/vendor/LeOS/overlay/common/packages/apps/Settings/res/values/config.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
- true
-
-
- com.android.wallpaper
-
-
- com.android.customization.picker.CustomizationPickerActivity
-
-
- com.android.customization.picker.CustomizationPickerActivity
-
-
- true
-
-
- android.intent.action.MAIN
-
-
- android.intent.action.MAIN
-
-
- false
-
-
- false
-
-
- true
-
diff --git a/vendor/LeOS/overlay/common/packages/apps/ThemePicker/res_override/values/override.xml b/vendor/LeOS/overlay/common/packages/apps/ThemePicker/res_override/values/override.xml
deleted file mode 100644
index a3769031..00000000
--- a/vendor/LeOS/overlay/common/packages/apps/ThemePicker/res_override/values/override.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
- - com.google.android.gm
- - com.google.android.googlequicksearchbox
- - com.google.android.apps.photos
- - com.google.android.apps.docs
- - com.google.android.youtube
- - com.android.vending
- - com.android.settings
- - com.android.deskclock
- - com.android.messaging
- - com.android.contacts
- - com.android.dialer
- - com.android.email
-
-
diff --git a/vendor/LeOS/rro_overlays/CertificationOverlay/Android.bp b/vendor/LeOS/rro_overlays/CertificationOverlay/Android.bp
deleted file mode 100644
index 1b8560da..00000000
--- a/vendor/LeOS/rro_overlays/CertificationOverlay/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-runtime_resource_overlay {
- name: "CertificationOverlay",
- theme: "CertificationOverlay",
- certificate: "platform",
- sdk_version: "current",
- product_specific: true
-}
diff --git a/vendor/LeOS/rro_overlays/CertificationOverlay/AndroidManifest.xml b/vendor/LeOS/rro_overlays/CertificationOverlay/AndroidManifest.xml
deleted file mode 100644
index 62974680..00000000
--- a/vendor/LeOS/rro_overlays/CertificationOverlay/AndroidManifest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
diff --git a/vendor/LeOS/rro_overlays/CertificationOverlay/res/values/config.xml b/vendor/LeOS/rro_overlays/CertificationOverlay/res/values/config.xml
deleted file mode 100644
index dc18085d..00000000
--- a/vendor/LeOS/rro_overlays/CertificationOverlay/res/values/config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
- - MTKAC70DTI
-
-
- - ac70dti
-
-
- - Archos
-
-
- - archos
-
-
- - Archos 70d Titanium
-
-
- - archos/MTKAC70DTI/ac70dti:7.0/NRD90M/20170602.033254:user/release-keys
-
-
- - 2017-06-02
-
-
- - 24
-
-
diff --git a/vendor/LeOS/rro_overlays/DocumentsUIOverlay/Android.bp b/vendor/LeOS/rro_overlays/DocumentsUIOverlay/Android.bp
deleted file mode 100644
index 1ce5ac83..00000000
--- a/vendor/LeOS/rro_overlays/DocumentsUIOverlay/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-runtime_resource_overlay {
- name: "DocumentsUIOverlay",
- certificate: "platform",
- sdk_version: "current",
- product_specific: true
-}
diff --git a/vendor/LeOS/rro_overlays/DocumentsUIOverlay/AndroidManifest.xml b/vendor/LeOS/rro_overlays/DocumentsUIOverlay/AndroidManifest.xml
deleted file mode 100644
index 1da06de1..00000000
--- a/vendor/LeOS/rro_overlays/DocumentsUIOverlay/AndroidManifest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
diff --git a/vendor/LeOS/rro_overlays/DocumentsUIOverlay/res/values/config.xml b/vendor/LeOS/rro_overlays/DocumentsUIOverlay/res/values/config.xml
deleted file mode 100644
index bd275433..00000000
--- a/vendor/LeOS/rro_overlays/DocumentsUIOverlay/res/values/config.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
- content://com.android.externalstorage.documents/root/primary
-
diff --git a/vendor/LeOS/rro_overlays/FrameworksOverlay/Android.bp b/vendor/LeOS/rro_overlays/FrameworksOverlay/Android.bp
deleted file mode 100644
index 660a4b02..00000000
--- a/vendor/LeOS/rro_overlays/FrameworksOverlay/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-runtime_resource_overlay {
- name: "FrameworksOverlay",
- certificate: "platform",
- sdk_version: "current",
- product_specific: true
-}
diff --git a/vendor/LeOS/rro_overlays/FrameworksOverlay/AndroidManifest.xml b/vendor/LeOS/rro_overlays/FrameworksOverlay/AndroidManifest.xml
deleted file mode 100644
index 3ae0a4a7..00000000
--- a/vendor/LeOS/rro_overlays/FrameworksOverlay/AndroidManifest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
diff --git a/vendor/LeOS/rro_overlays/FrameworksOverlay/res/color/config_progress_background_tint.xml b/vendor/LeOS/rro_overlays/FrameworksOverlay/res/color/config_progress_background_tint.xml
deleted file mode 100644
index a09829e2..00000000
--- a/vendor/LeOS/rro_overlays/FrameworksOverlay/res/color/config_progress_background_tint.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
diff --git a/vendor/LeOS/rro_overlays/FrameworksOverlay/res/values/config.xml b/vendor/LeOS/rro_overlays/FrameworksOverlay/res/values/config.xml
deleted file mode 100644
index 366d31c0..00000000
--- a/vendor/LeOS/rro_overlays/FrameworksOverlay/res/values/config.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-
-
-
-
- - com.android.location.fused
-
- - org.microg.nlp
-
-
-
-
- - com.android.bluetooth
-
- - com.android.phone
-
- - com.qualcomm.qti.cne
-
- - com.shannon.imsservice
-
- - com.mediatek.ims
-
- - org.omnirom.omnijaws
-
- - com.android.systemui
-
- - com.android.networkstack.tethering
-
-
-
- true
-
-
- true
-
-
- 4
-
-
- false
-
-
- true
- true
-
-
- true
-
-
- "M50 0C77.6 0 100 22.4 100 50C100 77.6 77.6 100 50 100C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0Z"
-
-
- false
-
-
- 2
-
-
- true
-
-
- com.android.wallpaper
-
-
- org.lineageos.aperture/.QrScannerActivity
-
-
- true
-
-
- android.sensor.light
-
-
-
-
- - app_cloning/cloned_apps_enabled=true
- - app_cloning/delete_all_app_clones_enabled=true
- - app_cloning/enable_app_cloning_building_blocks=true
-
-
diff --git a/vendor/LeOS/rro_overlays/SettingsProviderOverlay/Android.bp b/vendor/LeOS/rro_overlays/SettingsProviderOverlay/Android.bp
deleted file mode 100644
index a166d018..00000000
--- a/vendor/LeOS/rro_overlays/SettingsProviderOverlay/Android.bp
+++ /dev/null
@@ -1,7 +0,0 @@
-runtime_resource_overlay {
- name: "SettingsProviderOverlay",
- theme: "SettingsProviderOverlay",
- certificate: "platform",
- sdk_version: "current",
- product_specific: true
-}
diff --git a/vendor/LeOS/rro_overlays/SettingsProviderOverlay/AndroidManifest.xml b/vendor/LeOS/rro_overlays/SettingsProviderOverlay/AndroidManifest.xml
deleted file mode 100644
index 2eddc4a6..00000000
--- a/vendor/LeOS/rro_overlays/SettingsProviderOverlay/AndroidManifest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
diff --git a/vendor/LeOS/rro_overlays/SettingsProviderOverlay/res/values/defaults.xml b/vendor/LeOS/rro_overlays/SettingsProviderOverlay/res/values/defaults.xml
deleted file mode 100644
index f26bdd74..00000000
--- a/vendor/LeOS/rro_overlays/SettingsProviderOverlay/res/values/defaults.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- true
- true
-
-
- true
- false
-
-
- confirmed
-
diff --git a/vendor/LeOS/rro_overlays/SystemUIOverlay/Android.bp b/vendor/LeOS/rro_overlays/SystemUIOverlay/Android.bp
deleted file mode 100644
index b005b9df..00000000
--- a/vendor/LeOS/rro_overlays/SystemUIOverlay/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-runtime_resource_overlay {
- name: "SystemUIOverlay",
- certificate: "platform",
- sdk_version: "current",
- product_specific: true
-}
diff --git a/vendor/LeOS/rro_overlays/SystemUIOverlay/AndroidManifest.xml b/vendor/LeOS/rro_overlays/SystemUIOverlay/AndroidManifest.xml
deleted file mode 100644
index 8a11357d..00000000
--- a/vendor/LeOS/rro_overlays/SystemUIOverlay/AndroidManifest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
diff --git a/vendor/LeOS/rro_overlays/SystemUIOverlay/res/values/config.xml b/vendor/LeOS/rro_overlays/SystemUIOverlay/res/values/config.xml
deleted file mode 100644
index 40080d5f..00000000
--- a/vendor/LeOS/rro_overlays/SystemUIOverlay/res/values/config.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
- - com.android.systemui
- - com.android.systemui.falcon
- - com.android.systemui.falcon.debug
- - com.android.systemui.falcon.one
- - com.android.systemui.falcon.two
- - com.android.systemui.falcon.three
- - com.android.systemui.falcon.four
- - com.android.systemui.falcon.five
- - com.android.systemui.falcon.six
- - com.android.systemui.falcon.seven
- - com.android.systemui.falcon.eight
- - com.android.systemui.falcon.nine
- - com.android.systemui.plugin.globalactions.wallet
-
-
-
- true
-
-
- true
-
diff --git a/vendor/LeOS/rro_overlays/WifiOverlay/Android.bp b/vendor/LeOS/rro_overlays/WifiOverlay/Android.bp
deleted file mode 100644
index c2089a10..00000000
--- a/vendor/LeOS/rro_overlays/WifiOverlay/Android.bp
+++ /dev/null
@@ -1,6 +0,0 @@
-runtime_resource_overlay {
- name: "WifiOverlay",
- theme: "WifiOverlay",
- sdk_version: "current",
- product_specific: true
-}
diff --git a/vendor/LeOS/rro_overlays/WifiOverlay/AndroidManifest.xml b/vendor/LeOS/rro_overlays/WifiOverlay/AndroidManifest.xml
deleted file mode 100644
index 8e9e44fb..00000000
--- a/vendor/LeOS/rro_overlays/WifiOverlay/AndroidManifest.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
diff --git a/vendor/LeOS/rro_overlays/WifiOverlay/res/values/config.xml b/vendor/LeOS/rro_overlays/WifiOverlay/res/values/config.xml
deleted file mode 100644
index a4897e9b..00000000
--- a/vendor/LeOS/rro_overlays/WifiOverlay/res/values/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- true
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/AutoLoader.pm b/vendor/LeOS/tools-leos/common/perl-base/AutoLoader.pm
deleted file mode 100644
index 9b1a9015..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/AutoLoader.pm
+++ /dev/null
@@ -1,206 +0,0 @@
-package AutoLoader;
-
-use strict;
-use 5.006_001;
-
-our($VERSION, $AUTOLOAD);
-
-my $is_dosish;
-my $is_epoc;
-my $is_vms;
-my $is_macos;
-
-BEGIN {
- $is_dosish = $^O eq 'dos' || $^O eq 'os2' || $^O eq 'MSWin32' || $^O eq 'NetWare';
- $is_epoc = $^O eq 'epoc';
- $is_vms = $^O eq 'VMS';
- $is_macos = $^O eq 'MacOS';
- $VERSION = '5.74';
-}
-
-AUTOLOAD {
- my $sub = $AUTOLOAD;
- autoload_sub($sub);
- goto &$sub;
-}
-
-sub autoload_sub {
- my $sub = shift;
-
- my $filename = AutoLoader::find_filename( $sub );
-
- my $save = $@;
- local $!; # Do not munge the value.
- eval { local $SIG{__DIE__}; require $filename };
- if ($@) {
- if (substr($sub,-9) eq '::DESTROY') {
- no strict 'refs';
- *$sub = sub {};
- $@ = undef;
- } elsif ($@ =~ /^Can't locate/) {
- # The load might just have failed because the filename was too
- # long for some old SVR3 systems which treat long names as errors.
- # If we can successfully truncate a long name then it's worth a go.
- # There is a slight risk that we could pick up the wrong file here
- # but autosplit should have warned about that when splitting.
- if ($filename =~ s/(\w{12,})\.al$/substr($1,0,11).".al"/e){
- eval { local $SIG{__DIE__}; require $filename };
- }
- }
- if ($@){
- $@ =~ s/ at .*\n//;
- my $error = $@;
- require Carp;
- Carp::croak($error);
- }
- }
- $@ = $save;
-
- return 1;
-}
-
-sub find_filename {
- my $sub = shift;
- my $filename;
- # Braces used to preserve $1 et al.
- {
- # Try to find the autoloaded file from the package-qualified
- # name of the sub. e.g., if the sub needed is
- # Getopt::Long::GetOptions(), then $INC{Getopt/Long.pm} is
- # something like '/usr/lib/perl5/Getopt/Long.pm', and the
- # autoload file is '/usr/lib/perl5/auto/Getopt/Long/GetOptions.al'.
- #
- # However, if @INC is a relative path, this might not work. If,
- # for example, @INC = ('lib'), then $INC{Getopt/Long.pm} is
- # 'lib/Getopt/Long.pm', and we want to require
- # 'auto/Getopt/Long/GetOptions.al' (without the leading 'lib').
- # In this case, we simple prepend the 'auto/' and let the
- # C take care of the searching for us.
-
- my ($pkg,$func) = ($sub =~ /(.*)::([^:]+)$/);
- $pkg =~ s#::#/#g;
- if (defined($filename = $INC{"$pkg.pm"})) {
- if ($is_macos) {
- $pkg =~ tr#/#:#;
- $filename = undef
- unless $filename =~ s#^(.*)$pkg\.pm\z#$1auto:$pkg:$func.al#s;
- } else {
- $filename = undef
- unless $filename =~ s#^(.*)$pkg\.pm\z#$1auto/$pkg/$func.al#s;
- }
-
- # if the file exists, then make sure that it is a
- # a fully anchored path (i.e either '/usr/lib/auto/foo/bar.al',
- # or './lib/auto/foo/bar.al'. This avoids C searching
- # (and failing) to find the 'lib/auto/foo/bar.al' because it
- # looked for 'lib/lib/auto/foo/bar.al', given @INC = ('lib').
-
- if (defined $filename and -r $filename) {
- unless ($filename =~ m|^/|s) {
- if ($is_dosish) {
- unless ($filename =~ m{^([a-z]:)?[\\/]}is) {
- if ($^O ne 'NetWare') {
- $filename = "./$filename";
- } else {
- $filename = "$filename";
- }
- }
- }
- elsif ($is_epoc) {
- unless ($filename =~ m{^([a-z?]:)?[\\/]}is) {
- $filename = "./$filename";
- }
- }
- elsif ($is_vms) {
- # XXX todo by VMSmiths
- $filename = "./$filename";
- }
- elsif (!$is_macos) {
- $filename = "./$filename";
- }
- }
- }
- else {
- $filename = undef;
- }
- }
- unless (defined $filename) {
- # let C do the searching
- $filename = "auto/$sub.al";
- $filename =~ s#::#/#g;
- }
- }
- return $filename;
-}
-
-sub import {
- my $pkg = shift;
- my $callpkg = caller;
-
- #
- # Export symbols, but not by accident of inheritance.
- #
-
- if ($pkg eq 'AutoLoader') {
- if ( @_ and $_[0] =~ /^&?AUTOLOAD$/ ) {
- no strict 'refs';
- *{ $callpkg . '::AUTOLOAD' } = \&AUTOLOAD;
- }
- }
-
- #
- # Try to find the autosplit index file. Eg., if the call package
- # is POSIX, then $INC{POSIX.pm} is something like
- # '/usr/local/lib/perl5/POSIX.pm', and the autosplit index file is in
- # '/usr/local/lib/perl5/auto/POSIX/autosplit.ix', so we require that.
- #
- # However, if @INC is a relative path, this might not work. If,
- # for example, @INC = ('lib'), then
- # $INC{POSIX.pm} is 'lib/POSIX.pm', and we want to require
- # 'auto/POSIX/autosplit.ix' (without the leading 'lib').
- #
-
- (my $calldir = $callpkg) =~ s#::#/#g;
- my $path = $INC{$calldir . '.pm'};
- if (defined($path)) {
- # Try absolute path name, but only eval it if the
- # transformation from module path to autosplit.ix path
- # succeeded!
- my $replaced_okay;
- if ($is_macos) {
- (my $malldir = $calldir) =~ tr#/#:#;
- $replaced_okay = ($path =~ s#^(.*)$malldir\.pm\z#$1auto:$malldir:autosplit.ix#s);
- } else {
- $replaced_okay = ($path =~ s#^(.*)$calldir\.pm\z#$1auto/$calldir/autosplit.ix#);
- }
-
- eval { require $path; } if $replaced_okay;
- # If that failed, try relative path with normal @INC searching.
- if (!$replaced_okay or $@) {
- $path ="auto/$calldir/autosplit.ix";
- eval { require $path; };
- }
- if ($@) {
- my $error = $@;
- require Carp;
- Carp::carp($error);
- }
- }
-}
-
-sub unimport {
- my $callpkg = caller;
-
- no strict 'refs';
-
- for my $exported (qw( AUTOLOAD )) {
- my $symname = $callpkg . '::' . $exported;
- undef *{ $symname } if \&{ $symname } == \&{ $exported };
- *{ $symname } = \&{ $symname };
- }
-}
-
-1;
-
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Carp.pm b/vendor/LeOS/tools-leos/common/perl-base/Carp.pm
deleted file mode 100644
index 87a1328b..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Carp.pm
+++ /dev/null
@@ -1,619 +0,0 @@
-package Carp;
-
-{ use 5.006; }
-use strict;
-use warnings;
-BEGIN {
- # Very old versions of warnings.pm load Carp. This can go wrong due
- # to the circular dependency. If warnings is invoked before Carp,
- # then warnings starts by loading Carp, then Carp (above) tries to
- # invoke warnings, and gets nothing because warnings is in the process
- # of loading and hasn't defined its import method yet. If we were
- # only turning on warnings ("use warnings" above) this wouldn't be too
- # bad, because Carp would just gets the state of the -w switch and so
- # might not get some warnings that it wanted. The real problem is
- # that we then want to turn off Unicode warnings, but "no warnings
- # 'utf8'" won't be effective if we're in this circular-dependency
- # situation. So, if warnings.pm is an affected version, we turn
- # off all warnings ourselves by directly setting ${^WARNING_BITS}.
- # On unaffected versions, we turn off just Unicode warnings, via
- # the proper API.
- if(!defined($warnings::VERSION) || eval($warnings::VERSION) < 1.06) {
- ${^WARNING_BITS} = "";
- } else {
- "warnings"->unimport("utf8");
- }
-}
-
-sub _fetch_sub { # fetch sub without autovivifying
- my($pack, $sub) = @_;
- $pack .= '::';
- # only works with top-level packages
- return unless exists($::{$pack});
- for ($::{$pack}) {
- return unless ref \$_ eq 'GLOB' && *$_{HASH} && exists $$_{$sub};
- for ($$_{$sub}) {
- return ref \$_ eq 'GLOB' ? *$_{CODE} : undef
- }
- }
-}
-
-# UTF8_REGEXP_PROBLEM is a compile-time constant indicating whether Carp
-# must avoid applying a regular expression to an upgraded (is_utf8)
-# string. There are multiple problems, on different Perl versions,
-# that require this to be avoided. All versions prior to 5.13.8 will
-# load utf8_heavy.pl for the swash system, even if the regexp doesn't
-# use character classes. Perl 5.6 and Perls [5.11.2, 5.13.11) exhibit
-# specific problems when Carp is being invoked in the aftermath of a
-# syntax error.
-BEGIN {
- if("$]" < 5.013011) {
- *UTF8_REGEXP_PROBLEM = sub () { 1 };
- } else {
- *UTF8_REGEXP_PROBLEM = sub () { 0 };
- }
-}
-
-# is_utf8() is essentially the utf8::is_utf8() function, which indicates
-# whether a string is represented in the upgraded form (using UTF-8
-# internally). As utf8::is_utf8() is only available from Perl 5.8
-# onwards, extra effort is required here to make it work on Perl 5.6.
-BEGIN {
- if(defined(my $sub = _fetch_sub utf8 => 'is_utf8')) {
- *is_utf8 = $sub;
- } else {
- # black magic for perl 5.6
- *is_utf8 = sub { unpack("C", "\xaa".$_[0]) != 170 };
- }
-}
-
-# The downgrade() function defined here is to be used for attempts to
-# downgrade where it is acceptable to fail. It must be called with a
-# second argument that is a true value.
-BEGIN {
- if(defined(my $sub = _fetch_sub utf8 => 'downgrade')) {
- *downgrade = \&{"utf8::downgrade"};
- } else {
- *downgrade = sub {
- my $r = "";
- my $l = length($_[0]);
- for(my $i = 0; $i != $l; $i++) {
- my $o = ord(substr($_[0], $i, 1));
- return if $o > 255;
- $r .= chr($o);
- }
- $_[0] = $r;
- };
- }
-}
-
-our $VERSION = '1.42';
-$VERSION =~ tr/_//d;
-
-our $MaxEvalLen = 0;
-our $Verbose = 0;
-our $CarpLevel = 0;
-our $MaxArgLen = 64; # How much of each argument to print. 0 = all.
-our $MaxArgNums = 8; # How many arguments to print. 0 = all.
-our $RefArgFormatter = undef; # allow caller to format reference arguments
-
-require Exporter;
-our @ISA = ('Exporter');
-our @EXPORT = qw(confess croak carp);
-our @EXPORT_OK = qw(cluck verbose longmess shortmess);
-our @EXPORT_FAIL = qw(verbose); # hook to enable verbose mode
-
-# The members of %Internal are packages that are internal to perl.
-# Carp will not report errors from within these packages if it
-# can. The members of %CarpInternal are internal to Perl's warning
-# system. Carp will not report errors from within these packages
-# either, and will not report calls *to* these packages for carp and
-# croak. They replace $CarpLevel, which is deprecated. The
-# $Max(EvalLen|(Arg(Len|Nums)) variables are used to specify how the eval
-# text and function arguments should be formatted when printed.
-
-our %CarpInternal;
-our %Internal;
-
-# disable these by default, so they can live w/o require Carp
-$CarpInternal{Carp}++;
-$CarpInternal{warnings}++;
-$Internal{Exporter}++;
-$Internal{'Exporter::Heavy'}++;
-
-# if the caller specifies verbose usage ("perl -MCarp=verbose script.pl")
-# then the following method will be called by the Exporter which knows
-# to do this thanks to @EXPORT_FAIL, above. $_[1] will contain the word
-# 'verbose'.
-
-sub export_fail { shift; $Verbose = shift if $_[0] eq 'verbose'; @_ }
-
-sub _cgc {
- no strict 'refs';
- return \&{"CORE::GLOBAL::caller"} if defined &{"CORE::GLOBAL::caller"};
- return;
-}
-
-sub longmess {
- local($!, $^E);
- # Icky backwards compatibility wrapper. :-(
- #
- # The story is that the original implementation hard-coded the
- # number of call levels to go back, so calls to longmess were off
- # by one. Other code began calling longmess and expecting this
- # behaviour, so the replacement has to emulate that behaviour.
- my $cgc = _cgc();
- my $call_pack = $cgc ? $cgc->() : caller();
- if ( $Internal{$call_pack} or $CarpInternal{$call_pack} ) {
- return longmess_heavy(@_);
- }
- else {
- local $CarpLevel = $CarpLevel + 1;
- return longmess_heavy(@_);
- }
-}
-
-our @CARP_NOT;
-
-sub shortmess {
- local($!, $^E);
- my $cgc = _cgc();
-
- # Icky backwards compatibility wrapper. :-(
- local @CARP_NOT = $cgc ? $cgc->() : caller();
- shortmess_heavy(@_);
-}
-
-sub croak { die shortmess @_ }
-sub confess { die longmess @_ }
-sub carp { warn shortmess @_ }
-sub cluck { warn longmess @_ }
-
-BEGIN {
- if("$]" >= 5.015002 || ("$]" >= 5.014002 && "$]" < 5.015) ||
- ("$]" >= 5.012005 && "$]" < 5.013)) {
- *CALLER_OVERRIDE_CHECK_OK = sub () { 1 };
- } else {
- *CALLER_OVERRIDE_CHECK_OK = sub () { 0 };
- }
-}
-
-sub caller_info {
- my $i = shift(@_) + 1;
- my %call_info;
- my $cgc = _cgc();
- {
- # Some things override caller() but forget to implement the
- # @DB::args part of it, which we need. We check for this by
- # pre-populating @DB::args with a sentinel which no-one else
- # has the address of, so that we can detect whether @DB::args
- # has been properly populated. However, on earlier versions
- # of perl this check tickles a bug in CORE::caller() which
- # leaks memory. So we only check on fixed perls.
- @DB::args = \$i if CALLER_OVERRIDE_CHECK_OK;
- package DB;
- @call_info{
- qw(pack file line sub has_args wantarray evaltext is_require) }
- = $cgc ? $cgc->($i) : caller($i);
- }
-
- unless ( defined $call_info{file} ) {
- return ();
- }
-
- my $sub_name = Carp::get_subname( \%call_info );
- if ( $call_info{has_args} ) {
- my @args;
- if (CALLER_OVERRIDE_CHECK_OK && @DB::args == 1
- && ref $DB::args[0] eq ref \$i
- && $DB::args[0] == \$i ) {
- @DB::args = (); # Don't let anyone see the address of $i
- local $@;
- my $where = eval {
- my $func = $cgc or return '';
- my $gv =
- (_fetch_sub B => 'svref_2object' or return '')
- ->($func)->GV;
- my $package = $gv->STASH->NAME;
- my $subname = $gv->NAME;
- return unless defined $package && defined $subname;
-
- # returning CORE::GLOBAL::caller isn't useful for tracing the cause:
- return if $package eq 'CORE::GLOBAL' && $subname eq 'caller';
- " in &${package}::$subname";
- } || '';
- @args
- = "** Incomplete caller override detected$where; \@DB::args were not set **";
- }
- else {
- @args = @DB::args;
- my $overflow;
- if ( $MaxArgNums and @args > $MaxArgNums )
- { # More than we want to show?
- $#args = $MaxArgNums - 1;
- $overflow = 1;
- }
-
- @args = map { Carp::format_arg($_) } @args;
-
- if ($overflow) {
- push @args, '...';
- }
- }
-
- # Push the args onto the subroutine
- $sub_name .= '(' . join( ', ', @args ) . ')';
- }
- $call_info{sub_name} = $sub_name;
- return wantarray() ? %call_info : \%call_info;
-}
-
-# Transform an argument to a function into a string.
-our $in_recurse;
-sub format_arg {
- my $arg = shift;
-
- if ( ref($arg) ) {
- # legitimate, let's not leak it.
- if (!$in_recurse &&
- do {
- local $@;
- local $in_recurse = 1;
- local $SIG{__DIE__} = sub{};
- eval {$arg->can('CARP_TRACE') }
- })
- {
- return $arg->CARP_TRACE();
- }
- elsif (!$in_recurse &&
- defined($RefArgFormatter) &&
- do {
- local $@;
- local $in_recurse = 1;
- local $SIG{__DIE__} = sub{};
- eval {$arg = $RefArgFormatter->($arg); 1}
- })
- {
- return $arg;
- }
- else
- {
- my $sub = _fetch_sub(overload => 'StrVal');
- return $sub ? &$sub($arg) : "$arg";
- }
- }
- return "undef" if !defined($arg);
- downgrade($arg, 1);
- return $arg if !(UTF8_REGEXP_PROBLEM && is_utf8($arg)) &&
- $arg =~ /\A-?[0-9]+(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?\z/;
- my $suffix = "";
- if ( 2 < $MaxArgLen and $MaxArgLen < length($arg) ) {
- substr ( $arg, $MaxArgLen - 3 ) = "";
- $suffix = "...";
- }
- if(UTF8_REGEXP_PROBLEM && is_utf8($arg)) {
- for(my $i = length($arg); $i--; ) {
- my $c = substr($arg, $i, 1);
- my $x = substr($arg, 0, 0); # work around bug on Perl 5.8.{1,2}
- if($c eq "\"" || $c eq "\\" || $c eq "\$" || $c eq "\@") {
- substr $arg, $i, 0, "\\";
- next;
- }
- my $o = ord($c);
-
- # This code is repeated in Regexp::CARP_TRACE()
- if ($] ge 5.007_003) {
- substr $arg, $i, 1, sprintf("\\x{%x}", $o)
- if utf8::native_to_unicode($o) < utf8::native_to_unicode(0x20)
- || utf8::native_to_unicode($o) > utf8::native_to_unicode(0x7e);
- } elsif (ord("A") == 65) {
- substr $arg, $i, 1, sprintf("\\x{%x}", $o)
- if $o < 0x20 || $o > 0x7e;
- } else { # Early EBCDIC
-
- # 3 EBCDIC code pages supported then; all controls but one
- # are the code points below SPACE. The other one is 0x5F on
- # POSIX-BC; FF on the other two.
- substr $arg, $i, 1, sprintf("\\x{%x}", $o)
- if $o < ord(" ") || ((ord ("^") == 106)
- ? $o == 0x5f
- : $o == 0xff);
- }
- }
- } else {
- $arg =~ s/([\"\\\$\@])/\\$1/g;
- # This is all the ASCII printables spelled-out. It is portable to all
- # Perl versions and platforms (such as EBCDIC). There are other more
- # compact ways to do this, but may not work everywhere every version.
- $arg =~ s/([^ !"\$\%#'()*+,\-.\/0123456789:;<=>?\@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]^_`abcdefghijklmnopqrstuvwxyz\{|}~])/sprintf("\\x{%x}",ord($1))/eg;
- }
- downgrade($arg, 1);
- return "\"".$arg."\"".$suffix;
-}
-
-sub Regexp::CARP_TRACE {
- my $arg = "$_[0]";
- downgrade($arg, 1);
- if(UTF8_REGEXP_PROBLEM && is_utf8($arg)) {
- for(my $i = length($arg); $i--; ) {
- my $o = ord(substr($arg, $i, 1));
- my $x = substr($arg, 0, 0); # work around bug on Perl 5.8.{1,2}
-
- # This code is repeated in format_arg()
- if ($] ge 5.007_003) {
- substr $arg, $i, 1, sprintf("\\x{%x}", $o)
- if utf8::native_to_unicode($o) < utf8::native_to_unicode(0x20)
- || utf8::native_to_unicode($o) > utf8::native_to_unicode(0x7e);
- } elsif (ord("A") == 65) {
- substr $arg, $i, 1, sprintf("\\x{%x}", $o)
- if $o < 0x20 || $o > 0x7e;
- } else { # Early EBCDIC
- substr $arg, $i, 1, sprintf("\\x{%x}", $o)
- if $o < ord(" ") || ((ord ("^") == 106)
- ? $o == 0x5f
- : $o == 0xff);
- }
- }
- } else {
- # See comment in format_arg() about this same regex.
- $arg =~ s/([^ !"\$\%#'()*+,\-.\/0123456789:;<=>?\@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]^_`abcdefghijklmnopqrstuvwxyz\{|}~])/sprintf("\\x{%x}",ord($1))/eg;
- }
- downgrade($arg, 1);
- my $suffix = "";
- if($arg =~ /\A\(\?\^?([a-z]*)(?:-[a-z]*)?:(.*)\)\z/s) {
- ($suffix, $arg) = ($1, $2);
- }
- if ( 2 < $MaxArgLen and $MaxArgLen < length($arg) ) {
- substr ( $arg, $MaxArgLen - 3 ) = "";
- $suffix = "...".$suffix;
- }
- return "qr($arg)$suffix";
-}
-
-# Takes an inheritance cache and a package and returns
-# an anon hash of known inheritances and anon array of
-# inheritances which consequences have not been figured
-# for.
-sub get_status {
- my $cache = shift;
- my $pkg = shift;
- $cache->{$pkg} ||= [ { $pkg => $pkg }, [ trusts_directly($pkg) ] ];
- return @{ $cache->{$pkg} };
-}
-
-# Takes the info from caller() and figures out the name of
-# the sub/require/eval
-sub get_subname {
- my $info = shift;
- if ( defined( $info->{evaltext} ) ) {
- my $eval = $info->{evaltext};
- if ( $info->{is_require} ) {
- return "require $eval";
- }
- else {
- $eval =~ s/([\\\'])/\\$1/g;
- return "eval '" . str_len_trim( $eval, $MaxEvalLen ) . "'";
- }
- }
-
- # this can happen on older perls when the sub (or the stash containing it)
- # has been deleted
- if ( !defined( $info->{sub} ) ) {
- return '__ANON__::__ANON__';
- }
-
- return ( $info->{sub} eq '(eval)' ) ? 'eval {...}' : $info->{sub};
-}
-
-# Figures out what call (from the point of view of the caller)
-# the long error backtrace should start at.
-sub long_error_loc {
- my $i;
- my $lvl = $CarpLevel;
- {
- ++$i;
- my $cgc = _cgc();
- my @caller = $cgc ? $cgc->($i) : caller($i);
- my $pkg = $caller[0];
- unless ( defined($pkg) ) {
-
- # This *shouldn't* happen.
- if (%Internal) {
- local %Internal;
- $i = long_error_loc();
- last;
- }
- elsif (defined $caller[2]) {
- # this can happen when the stash has been deleted
- # in that case, just assume that it's a reasonable place to
- # stop (the file and line data will still be intact in any
- # case) - the only issue is that we can't detect if the
- # deleted package was internal (so don't do that then)
- # -doy
- redo unless 0 > --$lvl;
- last;
- }
- else {
- return 2;
- }
- }
- redo if $CarpInternal{$pkg};
- redo unless 0 > --$lvl;
- redo if $Internal{$pkg};
- }
- return $i - 1;
-}
-
-sub longmess_heavy {
- if ( ref( $_[0] ) ) { # don't break references as exceptions
- return wantarray ? @_ : $_[0];
- }
- my $i = long_error_loc();
- return ret_backtrace( $i, @_ );
-}
-
-# Returns a full stack backtrace starting from where it is
-# told.
-sub ret_backtrace {
- my ( $i, @error ) = @_;
- my $mess;
- my $err = join '', @error;
- $i++;
-
- my $tid_msg = '';
- if ( defined &threads::tid ) {
- my $tid = threads->tid;
- $tid_msg = " thread $tid" if $tid;
- }
-
- my %i = caller_info($i);
- $mess = "$err at $i{file} line $i{line}$tid_msg";
- if( defined $. ) {
- local $@ = '';
- local $SIG{__DIE__};
- eval {
- CORE::die;
- };
- if($@ =~ /^Died at .*(, <.*?> (?:line|chunk) \d+).$/ ) {
- $mess .= $1;
- }
- }
- $mess .= "\.\n";
-
- while ( my %i = caller_info( ++$i ) ) {
- $mess .= "\t$i{sub_name} called at $i{file} line $i{line}$tid_msg\n";
- }
-
- return $mess;
-}
-
-sub ret_summary {
- my ( $i, @error ) = @_;
- my $err = join '', @error;
- $i++;
-
- my $tid_msg = '';
- if ( defined &threads::tid ) {
- my $tid = threads->tid;
- $tid_msg = " thread $tid" if $tid;
- }
-
- my %i = caller_info($i);
- return "$err at $i{file} line $i{line}$tid_msg\.\n";
-}
-
-sub short_error_loc {
- # You have to create your (hash)ref out here, rather than defaulting it
- # inside trusts *on a lexical*, as you want it to persist across calls.
- # (You can default it on $_[2], but that gets messy)
- my $cache = {};
- my $i = 1;
- my $lvl = $CarpLevel;
- {
- my $cgc = _cgc();
- my $called = $cgc ? $cgc->($i) : caller($i);
- $i++;
- my $caller = $cgc ? $cgc->($i) : caller($i);
-
- if (!defined($caller)) {
- my @caller = $cgc ? $cgc->($i) : caller($i);
- if (@caller) {
- # if there's no package but there is other caller info, then
- # the package has been deleted - treat this as a valid package
- # in this case
- redo if defined($called) && $CarpInternal{$called};
- redo unless 0 > --$lvl;
- last;
- }
- else {
- return 0;
- }
- }
- redo if $Internal{$caller};
- redo if $CarpInternal{$caller};
- redo if $CarpInternal{$called};
- redo if trusts( $called, $caller, $cache );
- redo if trusts( $caller, $called, $cache );
- redo unless 0 > --$lvl;
- }
- return $i - 1;
-}
-
-sub shortmess_heavy {
- return longmess_heavy(@_) if $Verbose;
- return @_ if ref( $_[0] ); # don't break references as exceptions
- my $i = short_error_loc();
- if ($i) {
- ret_summary( $i, @_ );
- }
- else {
- longmess_heavy(@_);
- }
-}
-
-# If a string is too long, trims it with ...
-sub str_len_trim {
- my $str = shift;
- my $max = shift || 0;
- if ( 2 < $max and $max < length($str) ) {
- substr( $str, $max - 3 ) = '...';
- }
- return $str;
-}
-
-# Takes two packages and an optional cache. Says whether the
-# first inherits from the second.
-#
-# Recursive versions of this have to work to avoid certain
-# possible endless loops, and when following long chains of
-# inheritance are less efficient.
-sub trusts {
- my $child = shift;
- my $parent = shift;
- my $cache = shift;
- my ( $known, $partial ) = get_status( $cache, $child );
-
- # Figure out consequences until we have an answer
- while ( @$partial and not exists $known->{$parent} ) {
- my $anc = shift @$partial;
- next if exists $known->{$anc};
- $known->{$anc}++;
- my ( $anc_knows, $anc_partial ) = get_status( $cache, $anc );
- my @found = keys %$anc_knows;
- @$known{@found} = ();
- push @$partial, @$anc_partial;
- }
- return exists $known->{$parent};
-}
-
-# Takes a package and gives a list of those trusted directly
-sub trusts_directly {
- my $class = shift;
- no strict 'refs';
- my $stash = \%{"$class\::"};
- for my $var (qw/ CARP_NOT ISA /) {
- # Don't try using the variable until we know it exists,
- # to avoid polluting the caller's namespace.
- if ( $stash->{$var} && *{$stash->{$var}}{ARRAY} && @{$stash->{$var}} ) {
- return @{$stash->{$var}}
- }
- }
- return;
-}
-
-if(!defined($warnings::VERSION) ||
- do { no warnings "numeric"; $warnings::VERSION < 1.03 }) {
- # Very old versions of warnings.pm import from Carp. This can go
- # wrong due to the circular dependency. If Carp is invoked before
- # warnings, then Carp starts by loading warnings, then warnings
- # tries to import from Carp, and gets nothing because Carp is in
- # the process of loading and hasn't defined its import method yet.
- # So we work around that by manually exporting to warnings here.
- no strict "refs";
- *{"warnings::$_"} = \&$_ foreach @EXPORT;
-}
-
-1;
-
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Carp/Heavy.pm b/vendor/LeOS/tools-leos/common/perl-base/Carp/Heavy.pm
deleted file mode 100644
index f9c584a4..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Carp/Heavy.pm
+++ /dev/null
@@ -1,21 +0,0 @@
-package Carp::Heavy;
-
-use Carp ();
-
-our $VERSION = '1.42';
-$VERSION =~ tr/_//d;
-
-# Carp::Heavy was merged into Carp in version 1.12. Any mismatched versions
-# after this point are not significant and can be ignored.
-if(($Carp::VERSION || 0) < 1.12) {
- my $cv = defined($Carp::VERSION) ? $Carp::VERSION : "undef";
- die "Version mismatch between Carp $cv ($INC{q(Carp.pm)}) and Carp::Heavy $VERSION ($INC{q(Carp/Heavy.pm)}). Did you alter \@INC after Carp was loaded?\n";
-}
-
-1;
-
-# Most of the machinery of Carp used to be here.
-# It has been moved in Carp.pm now, but this placeholder remains for
-# the benefit of modules that like to preload Carp::Heavy directly.
-# This must load Carp, because some modules rely on the historical
-# behaviour of Carp::Heavy loading Carp.
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Config.pm b/vendor/LeOS/tools-leos/common/perl-base/Config.pm
deleted file mode 100644
index f31c0e41..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Config.pm
+++ /dev/null
@@ -1,111 +0,0 @@
-# This file was created by configpm when Perl was built. Any changes
-# made to this file will be lost the next time perl is built.
-
-# for a description of the variables, please have a look at the
-# Glossary file, as written in the Porting folder, or use the url:
-# http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/Glossary
-
-package Config;
-use strict;
-use warnings;
-use vars '%Config', '$VERSION';
-
-$VERSION = "5.026001";
-
-# Skip @Config::EXPORT because it only contains %Config, which we special
-# case below as it's not a function. @Config::EXPORT won't change in the
-# lifetime of Perl 5.
-my %Export_Cache = (myconfig => 1, config_sh => 1, config_vars => 1,
- config_re => 1, compile_date => 1, local_patches => 1,
- bincompat_options => 1, non_bincompat_options => 1,
- header_files => 1);
-
-@Config::EXPORT = qw(%Config);
-@Config::EXPORT_OK = keys %Export_Cache;
-
-# Need to stub all the functions to make code such as print Config::config_sh
-# keep working
-
-sub bincompat_options;
-sub compile_date;
-sub config_re;
-sub config_sh;
-sub config_vars;
-sub header_files;
-sub local_patches;
-sub myconfig;
-sub non_bincompat_options;
-
-# Define our own import method to avoid pulling in the full Exporter:
-sub import {
- shift;
- @_ = @Config::EXPORT unless @_;
-
- my @funcs = grep $_ ne '%Config', @_;
- my $export_Config = @funcs < @_ ? 1 : 0;
-
- no strict 'refs';
- my $callpkg = caller(0);
- foreach my $func (@funcs) {
- die qq{"$func" is not exported by the Config module\n}
- unless $Export_Cache{$func};
- *{$callpkg.'::'.$func} = \&{$func};
- }
-
- *{"$callpkg\::Config"} = \%Config if $export_Config;
- return;
-}
-
-die "$0: Perl lib version (5.26.1) doesn't match executable '$^X' version ($])"
- unless $^V;
-
-$^V eq 5.26.1
- or die sprintf "%s: Perl lib version (5.26.1) doesn't match executable '$^X' version (%vd)", $0, $^V;
-
-
-sub FETCH {
- my($self, $key) = @_;
-
- # check for cached value (which may be undef so we use exists not defined)
- return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key);
-}
-
-sub TIEHASH {
- bless $_[1], $_[0];
-}
-
-sub DESTROY { }
-
-sub AUTOLOAD {
- require 'Config_heavy.pl';
- goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
- die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
-}
-
-# tie returns the object, so the value returned to require will be true.
-tie %Config, 'Config', {
- archlibexp => '/usr/lib/x86_64-linux-gnu/perl/5.26',
- archname => 'x86_64-linux-gnu-thread-multi',
- cc => 'x86_64-linux-gnu-gcc',
- d_readlink => 'define',
- d_symlink => 'define',
- dlext => 'so',
- dlsrc => 'dl_dlopen.xs',
- dont_use_nlink => undef,
- exe_ext => '',
- inc_version_list => '5.26.0 5.26.0/x86_64-linux-gnu-thread-multi',
- intsize => '4',
- ldlibpthname => 'LD_LIBRARY_PATH',
- libpth => '/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib',
- osname => 'linux',
- osvers => '4.9.0',
- path_sep => ':',
- privlibexp => '/usr/share/perl/5.26',
- scriptdir => '/usr/bin',
- sitearchexp => '/usr/local/lib/x86_64-linux-gnu/perl/5.26.1',
- sitelibexp => '/usr/local/share/perl/5.26.1',
- so => 'so',
- useithreads => 'define',
- usevendorprefix => 'define',
- version => '5.26.1',
-};
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Config_git.pl b/vendor/LeOS/tools-leos/common/perl-base/Config_git.pl
deleted file mode 100644
index 6aacc4c1..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Config_git.pl
+++ /dev/null
@@ -1,12 +0,0 @@
-######################################################################
-# WARNING: 'lib/Config_git.pl' is generated by make_patchnum.pl
-# DO NOT EDIT DIRECTLY - edit make_patchnum.pl instead
-######################################################################
-$Config::Git_Data=<<'ENDOFGIT';
-git_commit_id=''
-git_describe=''
-git_branch=''
-git_uncommitted_changes=''
-git_commit_id_title=''
-
-ENDOFGIT
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Config_heavy.pl b/vendor/LeOS/tools-leos/common/perl-base/Config_heavy.pl
deleted file mode 100644
index 9c31d344..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Config_heavy.pl
+++ /dev/null
@@ -1,1526 +0,0 @@
-# This file was created by configpm when Perl was built. Any changes
-# made to this file will be lost the next time perl is built.
-
-package Config;
-use strict;
-use warnings;
-use vars '%Config';
-
-sub bincompat_options {
- return split ' ', (Internals::V())[0];
-}
-
-sub non_bincompat_options {
- return split ' ', (Internals::V())[1];
-}
-
-sub compile_date {
- return (Internals::V())[2]
-}
-
-sub local_patches {
- my (undef, undef, undef, @patches) = Internals::V();
- return @patches;
-}
-
-sub _V {
- die "Perl lib was built for 'linux' but is being run on '$^O'"
- unless "linux" eq $^O;
-
- my ($bincompat, $non_bincompat, $date, @patches) = Internals::V();
-
- my @opts = sort split ' ', "$bincompat $non_bincompat";
-
- print Config::myconfig();
- print "\nCharacteristics of this binary (from libperl): \n";
-
- print " Compile-time options:\n";
- print " $_\n" for @opts;
-
- if (@patches) {
- print " Locally applied patches:\n";
- print " $_\n" foreach @patches;
- }
-
- print " Built under linux\n";
-
- print " $date\n" if defined $date;
-
- my @env = map { "$_=\"$ENV{$_}\"" } sort grep {/^PERL/} keys %ENV;
-
- if (@env) {
- print " \%ENV:\n";
- print " $_\n" foreach @env;
- }
- print " \@INC:\n";
- print " $_\n" foreach @INC;
-}
-
-sub header_files {
- return qw(EXTERN.h INTERN.h XSUB.h av.h config.h cop.h cv.h
- dosish.h embed.h embedvar.h form.h gv.h handy.h hv.h hv_func.h
- intrpvar.h iperlsys.h keywords.h mg.h nostdio.h op.h opcode.h
- pad.h parser.h patchlevel.h perl.h perlio.h perliol.h perlsdio.h
- perlvars.h perly.h pp.h pp_proto.h proto.h regcomp.h regexp.h
- regnodes.h scope.h sv.h thread.h time64.h unixish.h utf8.h
- util.h);
-}
-
-##
-## This file was produced by running the Configure script. It holds all the
-## definitions figured out by Configure. Should you modify one of these values,
-## do not forget to propagate your changes by running "Configure -der". You may
-## instead choose to run each of the .SH files by yourself, or "Configure -S".
-##
-#
-## Package name : perl5
-## Source directory : .
-## Configuration time: Sat Mar 10 18:40:42 UTC 2018
-## Configured by : Ubuntu
-## Target system : linux localhost 4.9.0 #1 smp debian 4.9.0 x86_64 gnulinux
-#
-#: Configure command line arguments.
-#
-#: Variables propagated from previous config.sh file.
-
-our $summary = <<'!END!';
-Summary of my $package (revision $revision $version_patchlevel_string) configuration:
- $git_commit_id_title $git_commit_id$git_ancestor_line
- Platform:
- osname=$osname
- osvers=$osvers
- archname=$archname
- uname='$myuname'
- config_args='$config_args'
- hint=$hint
- useposix=$useposix
- d_sigaction=$d_sigaction
- useithreads=$useithreads
- usemultiplicity=$usemultiplicity
- use64bitint=$use64bitint
- use64bitall=$use64bitall
- uselongdouble=$uselongdouble
- usemymalloc=$usemymalloc
- default_inc_excludes_dot=$default_inc_excludes_dot
- bincompat5005=undef
- Compiler:
- cc='$cc'
- ccflags ='$ccflags'
- optimize='$optimize'
- cppflags='$cppflags'
- ccversion='$ccversion'
- gccversion='$gccversion'
- gccosandvers='$gccosandvers'
- intsize=$intsize
- longsize=$longsize
- ptrsize=$ptrsize
- doublesize=$doublesize
- byteorder=$byteorder
- doublekind=$doublekind
- d_longlong=$d_longlong
- longlongsize=$longlongsize
- d_longdbl=$d_longdbl
- longdblsize=$longdblsize
- longdblkind=$longdblkind
- ivtype='$ivtype'
- ivsize=$ivsize
- nvtype='$nvtype'
- nvsize=$nvsize
- Off_t='$lseektype'
- lseeksize=$lseeksize
- alignbytes=$alignbytes
- prototype=$prototype
- Linker and Libraries:
- ld='$ld'
- ldflags ='$ldflags'
- libpth=$libpth
- libs=$libs
- perllibs=$perllibs
- libc=$libc
- so=$so
- useshrplib=$useshrplib
- libperl=$libperl
- gnulibc_version='$gnulibc_version'
- Dynamic Linking:
- dlsrc=$dlsrc
- dlext=$dlext
- d_dlsymun=$d_dlsymun
- ccdlflags='$ccdlflags'
- cccdlflags='$cccdlflags'
- lddlflags='$lddlflags'
-
-!END!
-my $summary_expanded;
-
-sub myconfig {
- return $summary_expanded if $summary_expanded;
- ($summary_expanded = $summary) =~ s{\$(\w+)}
- {
- my $c;
- if ($1 eq 'git_ancestor_line') {
- if ($Config::Config{git_ancestor}) {
- $c= "\n Ancestor: $Config::Config{git_ancestor}";
- } else {
- $c= "";
- }
- } else {
- $c = $Config::Config{$1};
- }
- defined($c) ? $c : 'undef'
- }ge;
- $summary_expanded;
-}
-
-local *_ = \my $a;
-$_ = <<'!END!';
-Author=''
-CONFIG='true'
-Date=''
-Header=''
-Id=''
-Locker=''
-Log=''
-PATCHLEVEL='26'
-PERL_API_REVISION='5'
-PERL_API_SUBVERSION='0'
-PERL_API_VERSION='26'
-PERL_CONFIG_SH='true'
-PERL_PATCHLEVEL=''
-PERL_REVISION='5'
-PERL_SUBVERSION='1'
-PERL_VERSION='26'
-RCSfile=''
-Revision=''
-SUBVERSION='1'
-Source=''
-State=''
-_a='.a'
-_exe=''
-_o='.o'
-afs='false'
-afsroot='/afs'
-alignbytes='8'
-ansi2knr=''
-aphostname='/bin/hostname'
-api_revision='5'
-api_subversion='0'
-api_version='26'
-api_versionstring='5.26.0'
-ar='ar'
-archlib='/usr/lib/x86_64-linux-gnu/perl/5.26'
-archlibexp='/usr/lib/x86_64-linux-gnu/perl/5.26'
-archname='x86_64-linux-gnu-thread-multi'
-archname64=''
-archobjs=''
-asctime_r_proto='REENTRANT_PROTO_B_SB'
-awk='awk'
-baserev='5.0'
-bash=''
-bin='/usr/bin'
-bin_ELF='define'
-binexp='/usr/bin'
-bison='bison'
-byacc='byacc'
-byteorder='12345678'
-c=''
-castflags='0'
-cat='cat'
-cc='x86_64-linux-gnu-gcc'
-cccdlflags='-fPIC'
-ccdlflags='-Wl,-E'
-ccflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
-ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
-ccname='gcc'
-ccsymbols=''
-ccversion=''
-cf_by='Ubuntu'
-cf_email='perl@packages.debian.org'
-cf_time='Sat Mar 10 18:40:42 UTC 2018'
-charbits='8'
-charsize='1'
-chgrp=''
-chmod='chmod'
-chown=''
-clocktype='clock_t'
-comm='comm'
-compress=''
-config_arg0='Configure'
-config_arg1='-Dusethreads'
-config_arg10='-Darchname=x86_64-linux-gnu'
-config_arg11='-Dprefix=/usr'
-config_arg12='-Dprivlib=/usr/share/perl/5.26'
-config_arg13='-Darchlib=/usr/lib/x86_64-linux-gnu/perl/5.26'
-config_arg14='-Dvendorprefix=/usr'
-config_arg15='-Dvendorlib=/usr/share/perl5'
-config_arg16='-Dvendorarch=/usr/lib/x86_64-linux-gnu/perl5/5.26'
-config_arg17='-Dsiteprefix=/usr/local'
-config_arg18='-Dsitelib=/usr/local/share/perl/5.26.1'
-config_arg19='-Dsitearch=/usr/local/lib/x86_64-linux-gnu/perl/5.26.1'
-config_arg2='-Duselargefiles'
-config_arg20='-Dman1dir=/usr/share/man/man1'
-config_arg21='-Dman3dir=/usr/share/man/man3'
-config_arg22='-Dsiteman1dir=/usr/local/man/man1'
-config_arg23='-Dsiteman3dir=/usr/local/man/man3'
-config_arg24='-Duse64bitint'
-config_arg25='-Dman1ext=1'
-config_arg26='-Dman3ext=3perl'
-config_arg27='-Dpager=/usr/bin/sensible-pager'
-config_arg28='-Uafs'
-config_arg29='-Ud_csh'
-config_arg3='-Dcc=x86_64-linux-gnu-gcc'
-config_arg30='-Ud_ualarm'
-config_arg31='-Uusesfio'
-config_arg32='-Uusenm'
-config_arg33='-Ui_libutil'
-config_arg34='-Ui_xlocale'
-config_arg35='-Uversiononly'
-config_arg36='-DDEBUGGING=-g'
-config_arg37='-Doptimize=-O2'
-config_arg38='-dEs'
-config_arg39='-Uuseshrplib'
-config_arg4='-Dcpp=x86_64-linux-gnu-cpp'
-config_arg40='-Dotherlibdirs=/usr/lib/x86_64-linux-gnu/perl-base'
-config_arg5='-Dld=x86_64-linux-gnu-gcc'
-config_arg6='-Dccflags=-DDEBIAN -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/build/perl-5CtO_8/perl-5.26.1=. -fstack-protector-strong -Wformat -Werror=format-security'
-config_arg7='-Dldflags= -Wl,-Bsymbolic-functions -Wl,-z,relro'
-config_arg8='-Dlddlflags=-shared -Wl,-Bsymbolic-functions -Wl,-z,relro'
-config_arg9='-Dcccdlflags=-fPIC'
-config_argc='40'
-config_args='-Dusethreads -Duselargefiles -Dcc=x86_64-linux-gnu-gcc -Dcpp=x86_64-linux-gnu-cpp -Dld=x86_64-linux-gnu-gcc -Dccflags=-DDEBIAN -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/build/perl-5CtO_8/perl-5.26.1=. -fstack-protector-strong -Wformat -Werror=format-security -Dldflags= -Wl,-Bsymbolic-functions -Wl,-z,relro -Dlddlflags=-shared -Wl,-Bsymbolic-functions -Wl,-z,relro -Dcccdlflags=-fPIC -Darchname=x86_64-linux-gnu -Dprefix=/usr -Dprivlib=/usr/share/perl/5.26 -Darchlib=/usr/lib/x86_64-linux-gnu/perl/5.26 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/x86_64-linux-gnu/perl5/5.26 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.26.1 -Dsitearch=/usr/local/lib/x86_64-linux-gnu/perl/5.26.1 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Duse64bitint -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Ud_ualarm -Uusesfio -Uusenm -Ui_libutil -Ui_xlocale -Uversiononly -DDEBUGGING=-g -Doptimize=-O2 -dEs -Uuseshrplib -Dotherlibdirs=/usr/lib/x86_64-linux-gnu/perl-base'
-contains='grep'
-cp='cp'
-cpio=''
-cpp='x86_64-linux-gnu-cpp'
-cpp_stuff='42'
-cppccsymbols=''
-cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include'
-cpplast='-'
-cppminus='-'
-cpprun='x86_64-linux-gnu-gcc -E'
-cppstdin='x86_64-linux-gnu-gcc -E'
-cppsymbols='_FILE_OFFSET_BITS=64 _FORTIFY_SOURCE=2 _GNU_SOURCE=1 _LARGEFILE64_SOURCE=1 _LARGEFILE_SOURCE=1 _LP64=1 _POSIX_C_SOURCE=200809L _POSIX_SOURCE=1 _REENTRANT=1 _STDC_PREDEF_H=1 _XOPEN_SOURCE=700 _XOPEN_SOURCE_EXTENDED=1 __ATOMIC_ACQUIRE=2 __ATOMIC_ACQ_REL=4 __ATOMIC_CONSUME=1 __ATOMIC_HLE_ACQUIRE=65536 __ATOMIC_HLE_RELEASE=131072 __ATOMIC_RELAXED=0 __ATOMIC_RELEASE=3 __ATOMIC_SEQ_CST=5 __BIGGEST_ALIGNMENT__=16 __BYTE_ORDER__=1234 __CHAR16_TYPE__=short\ unsigned\ int __CHAR32_TYPE__=unsigned\ int __CHAR_BIT__=8 __DBL_DECIMAL_DIG__=17 __DBL_DENORM_MIN__=((double)4.94065645841246544176568792868221372e-324L) __DBL_DIG__=15 __DBL_EPSILON__=((double)2.22044604925031308084726333618164062e-16L) __DBL_HAS_DENORM__=1 __DBL_HAS_INFINITY__=1 __DBL_HAS_QUIET_NAN__=1 __DBL_MANT_DIG__=53 __DBL_MAX_10_EXP__=308 __DBL_MAX_EXP__=1024 __DBL_MAX__=((double)1.79769313486231570814527423731704357e+308L) __DBL_MIN_10_EXP__=(-307) __DBL_MIN_EXP__=(-1021) __DBL_MIN__=((double)2.22507385850720138309023271733240406e-308L) __DEC128_EPSILON__=1E-33DL __DEC128_MANT_DIG__=34 __DEC128_MAX_EXP__=6145 __DEC128_MAX__=9.999999999999999999999999999999999E6144DL __DEC128_MIN_EXP__=(-6142) __DEC128_MIN__=1E-6143DL __DEC128_SUBNORMAL_MIN__=0.000000000000000000000000000000001E-6143DL __DEC32_EPSILON__=1E-6DF __DEC32_MANT_DIG__=7 __DEC32_MAX_EXP__=97 __DEC32_MAX__=9.999999E96DF __DEC32_MIN_EXP__=(-94) __DEC32_MIN__=1E-95DF __DEC32_SUBNORMAL_MIN__=0.000001E-95DF __DEC64_EPSILON__=1E-15DD __DEC64_MANT_DIG__=16 __DEC64_MAX_EXP__=385 __DEC64_MAX__=9.999999999999999E384DD __DEC64_MIN_EXP__=(-382) __DEC64_MIN__=1E-383DD __DEC64_SUBNORMAL_MIN__=0.000000000000001E-383DD __DECIMAL_BID_FORMAT__=1 __DECIMAL_DIG__=21 __DEC_EVAL_METHOD__=2 __ELF__=1 __FINITE_MATH_ONLY__=0 __FLOAT_WORD_ORDER__=1234 __FLT128_DECIMAL_DIG__=36 __FLT128_DENORM_MIN__=6.47517511943802511092443895822764655e-4966F128 __FLT128_DIG__=33 __FLT128_EPSILON__=1.92592994438723585305597794258492732e-34F128 __FLT128_HAS_DENORM__=1 __FLT128_HAS_INFINITY__=1 __FLT128_HAS_QUIET_NAN__=1 __FLT128_MANT_DIG__=113 __FLT128_MAX_10_EXP__=4932 __FLT128_MAX_EXP__=16384 __FLT128_MAX__=1.18973149535723176508575932662800702e+4932F128 __FLT128_MIN_10_EXP__=(-4931) __FLT128_MIN_EXP__=(-16381) __FLT128_MIN__=3.36210314311209350626267781732175260e-4932F128 __FLT32X_DECIMAL_DIG__=17 __FLT32X_DENORM_MIN__=4.94065645841246544176568792868221372e-324F32x __FLT32X_DIG__=15 __FLT32X_EPSILON__=2.22044604925031308084726333618164062e-16F32x __FLT32X_HAS_DENORM__=1 __FLT32X_HAS_INFINITY__=1 __FLT32X_HAS_QUIET_NAN__=1 __FLT32X_MANT_DIG__=53 __FLT32X_MAX_10_EXP__=308 __FLT32X_MAX_EXP__=1024 __FLT32X_MAX__=1.79769313486231570814527423731704357e+308F32x __FLT32X_MIN_10_EXP__=(-307) __FLT32X_MIN_EXP__=(-1021) __FLT32X_MIN__=2.22507385850720138309023271733240406e-308F32x __FLT32_DECIMAL_DIG__=9 __FLT32_DENORM_MIN__=1.40129846432481707092372958328991613e-45F32 __FLT32_DIG__=6 __FLT32_EPSILON__=1.19209289550781250000000000000000000e-7F32 __FLT32_HAS_DENORM__=1 __FLT32_HAS_INFINITY__=1 __FLT32_HAS_QUIET_NAN__=1 __FLT32_MANT_DIG__=24 __FLT32_MAX_10_EXP__=38 __FLT32_MAX_EXP__=128 __FLT32_MAX__=3.40282346638528859811704183484516925e+38F32 __FLT32_MIN_10_EXP__=(-37) __FLT32_MIN_EXP__=(-125) __FLT32_MIN__=1.17549435082228750796873653722224568e-38F32 __FLT64X_DECIMAL_DIG__=21 __FLT64X_DENORM_MIN__=3.64519953188247460252840593361941982e-4951F64x __FLT64X_DIG__=18 __FLT64X_EPSILON__=1.08420217248550443400745280086994171e-19F64x __FLT64X_HAS_DENORM__=1 __FLT64X_HAS_INFINITY__=1 __FLT64X_HAS_QUIET_NAN__=1 __FLT64X_MANT_DIG__=64 __FLT64X_MAX_10_EXP__=4932 __FLT64X_MAX_EXP__=16384 __FLT64X_MAX__=1.18973149535723176502126385303097021e+4932F64x __FLT64X_MIN_10_EXP__=(-4931) __FLT64X_MIN_EXP__=(-16381) __FLT64X_MIN__=3.36210314311209350626267781732175260e-4932F64x __FLT64_DECIMAL_DIG__=17 __FLT64_DENORM_MIN__=4.94065645841246544176568792868221372e-324F64 __FLT64_DIG__=15 __FLT64_EPSILON__=2.22044604925031308084726333618164062e-16F64 __FLT64_HAS_DENORM__=1 __FLT64_HAS_INFINITY__=1 __FLT64_HAS_QUIET_NAN__=1 __FLT64_MANT_DIG__=53 __FLT64_MAX_10_EXP__=308 __FLT64_MAX_EXP__=1024 __FLT64_MAX__=1.79769313486231570814527423731704357e+308F64 __FLT64_MIN_10_EXP__=(-307) __FLT64_MIN_EXP__=(-1021) __FLT64_MIN__=2.22507385850720138309023271733240406e-308F64 __FLT_DECIMAL_DIG__=9 __FLT_DENORM_MIN__=1.40129846432481707092372958328991613e-45F __FLT_DIG__=6 __FLT_EPSILON__=1.19209289550781250000000000000000000e-7F __FLT_EVAL_METHOD_TS_18661_3__=0 __FLT_EVAL_METHOD__=0 __FLT_HAS_DENORM__=1 __FLT_HAS_INFINITY__=1 __FLT_HAS_QUIET_NAN__=1 __FLT_MANT_DIG__=24 __FLT_MAX_10_EXP__=38 __FLT_MAX_EXP__=128 __FLT_MAX__=3.40282346638528859811704183484516925e+38F __FLT_MIN_10_EXP__=(-37) __FLT_MIN_EXP__=(-125) __FLT_MIN__=1.17549435082228750796873653722224568e-38F __FLT_RADIX__=2 __FXSR__=1 __GCC_ASM_FLAG_OUTPUTS__=1 __GCC_ATOMIC_BOOL_LOCK_FREE=2 __GCC_ATOMIC_CHAR16_T_LOCK_FREE=2 __GCC_ATOMIC_CHAR32_T_LOCK_FREE=2 __GCC_ATOMIC_CHAR_LOCK_FREE=2 __GCC_ATOMIC_INT_LOCK_FREE=2 __GCC_ATOMIC_LLONG_LOCK_FREE=2 __GCC_ATOMIC_LONG_LOCK_FREE=2 __GCC_ATOMIC_POINTER_LOCK_FREE=2 __GCC_ATOMIC_SHORT_LOCK_FREE=2 __GCC_ATOMIC_TEST_AND_SET_TRUEVAL=1 __GCC_ATOMIC_WCHAR_T_LOCK_FREE=2 __GCC_HAVE_DWARF2_CFI_ASM=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4=1 __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8=1 __GCC_IEC_559=2 __GCC_IEC_559_COMPLEX=2 __GLIBC_MINOR__=27 __GLIBC__=2 __GNUC_MINOR__=3 __GNUC_PATCHLEVEL__=0 __GNUC_STDC_INLINE__=1 __GNUC__=7 __GNU_LIBRARY__=6 __GXX_ABI_VERSION=1011 __INT16_C=__INT16_C __INT16_MAX__=0x7fff __INT16_TYPE__=short\ int __INT32_C=__INT32_C __INT32_MAX__=0x7fffffff __INT32_TYPE__=int __INT64_C=__INT64_C __INT64_MAX__=0x7fffffffffffffffL __INT64_TYPE__=long\ int __INT8_C=__INT8_C __INT8_MAX__=0x7f __INT8_TYPE__=signed\ char __INTMAX_C=__INTMAX_C __INTMAX_MAX__=0x7fffffffffffffffL __INTMAX_TYPE__=long\ int __INTMAX_WIDTH__=64 __INTPTR_MAX__=0x7fffffffffffffffL __INTPTR_TYPE__=long\ int __INTPTR_WIDTH__=64 __INT_FAST16_MAX__=0x7fffffffffffffffL __INT_FAST16_TYPE__=long\ int __INT_FAST16_WIDTH__=64 __INT_FAST32_MAX__=0x7fffffffffffffffL __INT_FAST32_TYPE__=long\ int __INT_FAST32_WIDTH__=64 __INT_FAST64_MAX__=0x7fffffffffffffffL __INT_FAST64_TYPE__=long\ int __INT_FAST64_WIDTH__=64 __INT_FAST8_MAX__=0x7f __INT_FAST8_TYPE__=signed\ char __INT_FAST8_WIDTH__=8 __INT_LEAST16_MAX__=0x7fff __INT_LEAST16_TYPE__=short\ int __INT_LEAST16_WIDTH__=16 __INT_LEAST32_MAX__=0x7fffffff __INT_LEAST32_TYPE__=int __INT_LEAST32_WIDTH__=32 __INT_LEAST64_MAX__=0x7fffffffffffffffL __INT_LEAST64_TYPE__=long\ int __INT_LEAST64_WIDTH__=64 __INT_LEAST8_MAX__=0x7f __INT_LEAST8_TYPE__=signed\ char __INT_LEAST8_WIDTH__=8 __INT_MAX__=0x7fffffff __INT_WIDTH__=32 __LDBL_DECIMAL_DIG__=21 __LDBL_DENORM_MIN__=3.64519953188247460252840593361941982e-4951L __LDBL_DIG__=18 __LDBL_EPSILON__=1.08420217248550443400745280086994171e-19L __LDBL_HAS_DENORM__=1 __LDBL_HAS_INFINITY__=1 __LDBL_HAS_QUIET_NAN__=1 __LDBL_MANT_DIG__=64 __LDBL_MAX_10_EXP__=4932 __LDBL_MAX_EXP__=16384 __LDBL_MAX__=1.18973149535723176502126385303097021e+4932L __LDBL_MIN_10_EXP__=(-4931) __LDBL_MIN_EXP__=(-16381) __LDBL_MIN__=3.36210314311209350626267781732175260e-4932L __LONG_LONG_MAX__=0x7fffffffffffffffLL __LONG_LONG_WIDTH__=64 __LONG_MAX__=0x7fffffffffffffffL __LONG_WIDTH__=64 __LP64__=1 __MMX__=1 __ORDER_BIG_ENDIAN__=4321 __ORDER_LITTLE_ENDIAN__=1234 __ORDER_PDP_ENDIAN__=3412 __PIC__=2 __PIE__=2 __PRAGMA_REDEFINE_EXTNAME=1 __PTRDIFF_MAX__=0x7fffffffffffffffL __PTRDIFF_TYPE__=long\ int __PTRDIFF_WIDTH__=64 __REGISTER_PREFIX__= __SCHAR_MAX__=0x7f __SCHAR_WIDTH__=8 __SEG_FS=1 __SEG_GS=1 __SHRT_MAX__=0x7fff __SHRT_WIDTH__=16 __SIG_ATOMIC_MAX__=0x7fffffff __SIG_ATOMIC_MIN__=(-0x7fffffff\ -\ 1) __SIG_ATOMIC_TYPE__=int __SIG_ATOMIC_WIDTH__=32 __SIZEOF_DOUBLE__=8 __SIZEOF_FLOAT128__=16 __SIZEOF_FLOAT80__=16 __SIZEOF_FLOAT__=4 __SIZEOF_INT128__=16 __SIZEOF_INT__=4 __SIZEOF_LONG_DOUBLE__=16 __SIZEOF_LONG_LONG__=8 __SIZEOF_LONG__=8 __SIZEOF_POINTER__=8 __SIZEOF_PTRDIFF_T__=8 __SIZEOF_SHORT__=2 __SIZEOF_SIZE_T__=8 __SIZEOF_WCHAR_T__=4 __SIZEOF_WINT_T__=4 __SIZE_MAX__=0xffffffffffffffffUL __SIZE_TYPE__=long\ unsigned\ int __SIZE_WIDTH__=64 __SSE2_MATH__=1 __SSE2__=1 __SSE_MATH__=1 __SSE__=1 __SSP_STRONG__=3 __STDC_HOSTED__=1 __STDC_IEC_559_COMPLEX__=1 __STDC_IEC_559__=1 __STDC_ISO_10646__=201706L __STDC_NO_THREADS__=1 __STDC_UTF_16__=1 __STDC_UTF_32__=1 __STDC_VERSION__=201112L __STDC__=1 __UINT16_C=__UINT16_C __UINT16_MAX__=0xffff __UINT16_TYPE__=short\ unsigned\ int __UINT32_C=__UINT32_C __UINT32_MAX__=0xffffffffU __UINT32_TYPE__=unsigned\ int __UINT64_C=__UINT64_C __UINT64_MAX__=0xffffffffffffffffUL __UINT64_TYPE__=long\ unsigned\ int __UINT8_C=__UINT8_C __UINT8_MAX__=0xff __UINT8_TYPE__=unsigned\ char __UINTMAX_C=__UINTMAX_C __UINTMAX_MAX__=0xffffffffffffffffUL __UINTMAX_TYPE__=long\ unsigned\ int __UINTPTR_MAX__=0xffffffffffffffffUL __UINTPTR_TYPE__=long\ unsigned\ int __UINT_FAST16_MAX__=0xffffffffffffffffUL __UINT_FAST16_TYPE__=long\ unsigned\ int __UINT_FAST32_MAX__=0xffffffffffffffffUL __UINT_FAST32_TYPE__=long\ unsigned\ int __UINT_FAST64_MAX__=0xffffffffffffffffUL __UINT_FAST64_TYPE__=long\ unsigned\ int __UINT_FAST8_MAX__=0xff __UINT_FAST8_TYPE__=unsigned\ char __UINT_LEAST16_MAX__=0xffff __UINT_LEAST16_TYPE__=short\ unsigned\ int __UINT_LEAST32_MAX__=0xffffffffU __UINT_LEAST32_TYPE__=unsigned\ int __UINT_LEAST64_MAX__=0xffffffffffffffffUL __UINT_LEAST64_TYPE__=long\ unsigned\ int __UINT_LEAST8_MAX__=0xff __UINT_LEAST8_TYPE__=unsigned\ char __USER_LABEL_PREFIX__= __USE_FILE_OFFSET64=1 __USE_GNU=1 __USE_LARGEFILE64=1 __USE_LARGEFILE=1 __USE_MISC=1 __USE_POSIX199309=1 __USE_POSIX199506=1 __USE_POSIX2=1 __USE_POSIX=1 __USE_UNIX98=1 __USE_XOPEN=1 __USE_XOPEN_EXTENDED=1 __VERSION__="7.3.0" __WCHAR_MAX__=0x7fffffff __WCHAR_MIN__=(-0x7fffffff\ -\ 1) __WCHAR_TYPE__=int __WCHAR_WIDTH__=32 __WINT_MAX__=0xffffffffU __WINT_MIN__=0U __WINT_TYPE__=unsigned\ int __WINT_WIDTH__=32 __amd64=1 __amd64__=1 __code_model_small__=1 __gnu_linux__=1 __has_include=__has_include __has_include_next=__has_include_next __k8=1 __k8__=1 __linux=1 __linux__=1 __pic__=2 __pie__=2 __unix=1 __unix__=1 __x86_64=1 __x86_64__=1 linux=1 unix=1'
-crypt_r_proto='REENTRANT_PROTO_B_CCS'
-cryptlib=''
-csh='csh'
-ctermid_r_proto='0'
-ctime_r_proto='REENTRANT_PROTO_B_SB'
-d_Gconvert='gcvt((x),(n),(b))'
-d_PRIEUldbl='define'
-d_PRIFUldbl='define'
-d_PRIGUldbl='define'
-d_PRIXU64='define'
-d_PRId64='define'
-d_PRIeldbl='define'
-d_PRIfldbl='define'
-d_PRIgldbl='define'
-d_PRIi64='define'
-d_PRIo64='define'
-d_PRIu64='define'
-d_PRIx64='define'
-d_SCNfldbl='define'
-d__fwalk='undef'
-d_access='define'
-d_accessx='undef'
-d_acosh='define'
-d_aintl='undef'
-d_alarm='define'
-d_archlib='define'
-d_asctime64='undef'
-d_asctime_r='define'
-d_asinh='define'
-d_atanh='define'
-d_atolf='undef'
-d_atoll='define'
-d_attribute_deprecated='define'
-d_attribute_format='define'
-d_attribute_malloc='define'
-d_attribute_nonnull='define'
-d_attribute_noreturn='define'
-d_attribute_pure='define'
-d_attribute_unused='define'
-d_attribute_warn_unused_result='define'
-d_backtrace='define'
-d_bcmp='define'
-d_bcopy='define'
-d_bsd='undef'
-d_bsdgetpgrp='undef'
-d_bsdsetpgrp='undef'
-d_builtin_choose_expr='define'
-d_builtin_expect='define'
-d_bzero='define'
-d_c99_variadic_macros='define'
-d_casti32='undef'
-d_castneg='define'
-d_cbrt='define'
-d_charvspr='undef'
-d_chown='define'
-d_chroot='define'
-d_chsize='undef'
-d_class='undef'
-d_clearenv='define'
-d_closedir='define'
-d_cmsghdr_s='define'
-d_const='define'
-d_copysign='define'
-d_copysignl='define'
-d_cplusplus='undef'
-d_crypt='define'
-d_crypt_r='define'
-d_csh='undef'
-d_ctermid='define'
-d_ctermid_r='undef'
-d_ctime64='undef'
-d_ctime_r='define'
-d_cuserid='define'
-d_dbl_dig='define'
-d_dbminitproto='define'
-d_difftime='define'
-d_difftime64='undef'
-d_dir_dd_fd='undef'
-d_dirfd='define'
-d_dirnamlen='undef'
-d_dladdr='define'
-d_dlerror='define'
-d_dlopen='define'
-d_dlsymun='undef'
-d_dosuid='undef'
-d_double_has_inf='define'
-d_double_has_nan='define'
-d_double_has_negative_zero='define'
-d_double_has_subnormals='define'
-d_double_style_cray='undef'
-d_double_style_ibm='undef'
-d_double_style_ieee='define'
-d_double_style_vax='undef'
-d_drand48_r='define'
-d_drand48proto='define'
-d_dup2='define'
-d_duplocale='define'
-d_eaccess='define'
-d_endgrent='define'
-d_endgrent_r='undef'
-d_endhent='define'
-d_endhostent_r='undef'
-d_endnent='define'
-d_endnetent_r='undef'
-d_endpent='define'
-d_endprotoent_r='undef'
-d_endpwent='define'
-d_endpwent_r='undef'
-d_endsent='define'
-d_endservent_r='undef'
-d_eofnblk='define'
-d_erf='define'
-d_erfc='define'
-d_eunice='undef'
-d_exp2='define'
-d_expm1='define'
-d_faststdio='undef'
-d_fchdir='define'
-d_fchmod='define'
-d_fchown='define'
-d_fcntl='define'
-d_fcntl_can_lock='define'
-d_fd_macros='define'
-d_fd_set='define'
-d_fdclose='undef'
-d_fdim='define'
-d_fds_bits='define'
-d_fegetround='define'
-d_fgetpos='define'
-d_finite='define'
-d_finitel='define'
-d_flexfnam='define'
-d_flock='define'
-d_flockproto='define'
-d_fma='define'
-d_fmax='define'
-d_fmin='define'
-d_fork='define'
-d_fp_class='undef'
-d_fp_classify='undef'
-d_fp_classl='undef'
-d_fpathconf='define'
-d_fpclass='undef'
-d_fpclassify='define'
-d_fpclassl='undef'
-d_fpgetround='undef'
-d_fpos64_t='undef'
-d_freelocale='define'
-d_frexpl='define'
-d_fs_data_s='undef'
-d_fseeko='define'
-d_fsetpos='define'
-d_fstatfs='define'
-d_fstatvfs='define'
-d_fsync='define'
-d_ftello='define'
-d_ftime='undef'
-d_futimes='define'
-d_gai_strerror='define'
-d_gdbm_ndbm_h_uses_prototypes='define'
-d_gdbmndbm_h_uses_prototypes='undef'
-d_getaddrinfo='define'
-d_getcwd='define'
-d_getespwnam='undef'
-d_getfsstat='undef'
-d_getgrent='define'
-d_getgrent_r='define'
-d_getgrgid_r='define'
-d_getgrnam_r='define'
-d_getgrps='define'
-d_gethbyaddr='define'
-d_gethbyname='define'
-d_gethent='define'
-d_gethname='define'
-d_gethostbyaddr_r='define'
-d_gethostbyname_r='define'
-d_gethostent_r='define'
-d_gethostprotos='define'
-d_getitimer='define'
-d_getlogin='define'
-d_getlogin_r='define'
-d_getmnt='undef'
-d_getmntent='define'
-d_getnameinfo='define'
-d_getnbyaddr='define'
-d_getnbyname='define'
-d_getnent='define'
-d_getnetbyaddr_r='define'
-d_getnetbyname_r='define'
-d_getnetent_r='define'
-d_getnetprotos='define'
-d_getpagsz='define'
-d_getpbyname='define'
-d_getpbynumber='define'
-d_getpent='define'
-d_getpgid='define'
-d_getpgrp='define'
-d_getpgrp2='undef'
-d_getppid='define'
-d_getprior='define'
-d_getprotobyname_r='define'
-d_getprotobynumber_r='define'
-d_getprotoent_r='define'
-d_getprotoprotos='define'
-d_getprpwnam='undef'
-d_getpwent='define'
-d_getpwent_r='define'
-d_getpwnam_r='define'
-d_getpwuid_r='define'
-d_getsbyname='define'
-d_getsbyport='define'
-d_getsent='define'
-d_getservbyname_r='define'
-d_getservbyport_r='define'
-d_getservent_r='define'
-d_getservprotos='define'
-d_getspnam='define'
-d_getspnam_r='define'
-d_gettimeod='define'
-d_gmtime64='undef'
-d_gmtime_r='define'
-d_gnulibc='define'
-d_grpasswd='define'
-d_hasmntopt='define'
-d_htonl='define'
-d_hypot='define'
-d_ilogb='define'
-d_ilogbl='define'
-d_inc_version_list='define'
-d_index='undef'
-d_inetaton='define'
-d_inetntop='define'
-d_inetpton='define'
-d_int64_t='define'
-d_ip_mreq='define'
-d_ip_mreq_source='define'
-d_ipv6_mreq='define'
-d_ipv6_mreq_source='undef'
-d_isascii='define'
-d_isblank='define'
-d_isfinite='define'
-d_isfinitel='undef'
-d_isinf='define'
-d_isinfl='define'
-d_isless='undef'
-d_isnan='define'
-d_isnanl='define'
-d_isnormal='define'
-d_j0='define'
-d_j0l='define'
-d_killpg='define'
-d_lc_monetary_2008='define'
-d_lchown='define'
-d_ldbl_dig='define'
-d_ldexpl='define'
-d_lgamma='define'
-d_lgamma_r='define'
-d_libm_lib_version='undef'
-d_libname_unique='undef'
-d_link='define'
-d_llrint='define'
-d_llrintl='define'
-d_llround='define'
-d_llroundl='define'
-d_localtime64='undef'
-d_localtime_r='define'
-d_localtime_r_needs_tzset='define'
-d_locconv='define'
-d_lockf='define'
-d_log1p='define'
-d_log2='define'
-d_logb='define'
-d_long_double_style_ieee='define'
-d_long_double_style_ieee_doubledouble='undef'
-d_long_double_style_ieee_extended='define'
-d_long_double_style_ieee_std='undef'
-d_long_double_style_vax='undef'
-d_longdbl='define'
-d_longlong='define'
-d_lrint='define'
-d_lrintl='define'
-d_lround='define'
-d_lroundl='define'
-d_lseekproto='define'
-d_lstat='define'
-d_madvise='define'
-d_malloc_good_size='undef'
-d_malloc_size='undef'
-d_mblen='define'
-d_mbstowcs='define'
-d_mbtowc='define'
-d_memchr='define'
-d_memcmp='define'
-d_memcpy='define'
-d_memmem='define'
-d_memmove='define'
-d_memset='define'
-d_mkdir='define'
-d_mkdtemp='define'
-d_mkfifo='define'
-d_mkstemp='define'
-d_mkstemps='define'
-d_mktime='define'
-d_mktime64='undef'
-d_mmap='define'
-d_modfl='define'
-d_modflproto='define'
-d_mprotect='define'
-d_msg='define'
-d_msg_ctrunc='define'
-d_msg_dontroute='define'
-d_msg_oob='define'
-d_msg_peek='define'
-d_msg_proxy='define'
-d_msgctl='define'
-d_msgget='define'
-d_msghdr_s='define'
-d_msgrcv='define'
-d_msgsnd='define'
-d_msync='define'
-d_munmap='define'
-d_mymalloc='undef'
-d_nan='define'
-d_ndbm='define'
-d_ndbm_h_uses_prototypes='define'
-d_nearbyint='define'
-d_newlocale='define'
-d_nextafter='define'
-d_nexttoward='define'
-d_nice='define'
-d_nl_langinfo='define'
-d_nv_preserves_uv='undef'
-d_nv_zero_is_allbits_zero='define'
-d_off64_t='define'
-d_old_pthread_create_joinable='undef'
-d_oldpthreads='undef'
-d_oldsock='undef'
-d_open3='define'
-d_pathconf='define'
-d_pause='define'
-d_perl_otherlibdirs='define'
-d_phostname='undef'
-d_pipe='define'
-d_poll='define'
-d_portable='define'
-d_prctl='define'
-d_prctl_set_name='define'
-d_printf_format_null='undef'
-d_procselfexe='define'
-d_pseudofork='undef'
-d_pthread_atfork='define'
-d_pthread_attr_setscope='define'
-d_pthread_yield='define'
-d_ptrdiff_t='define'
-d_pwage='undef'
-d_pwchange='undef'
-d_pwclass='undef'
-d_pwcomment='undef'
-d_pwexpire='undef'
-d_pwgecos='define'
-d_pwpasswd='define'
-d_pwquota='undef'
-d_qgcvt='define'
-d_quad='define'
-d_querylocale='undef'
-d_random_r='define'
-d_re_comp='undef'
-d_readdir='define'
-d_readdir64_r='define'
-d_readdir_r='define'
-d_readlink='define'
-d_readv='define'
-d_recvmsg='define'
-d_regcmp='undef'
-d_regcomp='define'
-d_remainder='define'
-d_remquo='define'
-d_rename='define'
-d_rewinddir='define'
-d_rint='define'
-d_rmdir='define'
-d_round='define'
-d_safebcpy='undef'
-d_safemcpy='undef'
-d_sanemcmp='define'
-d_sbrkproto='define'
-d_scalbn='define'
-d_scalbnl='define'
-d_sched_yield='define'
-d_scm_rights='define'
-d_seekdir='define'
-d_select='define'
-d_sem='define'
-d_semctl='define'
-d_semctl_semid_ds='define'
-d_semctl_semun='define'
-d_semget='define'
-d_semop='define'
-d_sendmsg='define'
-d_setegid='define'
-d_seteuid='define'
-d_setgrent='define'
-d_setgrent_r='undef'
-d_setgrps='define'
-d_sethent='define'
-d_sethostent_r='undef'
-d_setitimer='define'
-d_setlinebuf='define'
-d_setlocale='define'
-d_setlocale_r='undef'
-d_setnent='define'
-d_setnetent_r='undef'
-d_setpent='define'
-d_setpgid='define'
-d_setpgrp='define'
-d_setpgrp2='undef'
-d_setprior='define'
-d_setproctitle='undef'
-d_setprotoent_r='undef'
-d_setpwent='define'
-d_setpwent_r='undef'
-d_setregid='define'
-d_setresgid='define'
-d_setresuid='define'
-d_setreuid='define'
-d_setrgid='undef'
-d_setruid='undef'
-d_setsent='define'
-d_setservent_r='undef'
-d_setsid='define'
-d_setvbuf='define'
-d_shm='define'
-d_shmat='define'
-d_shmatprototype='define'
-d_shmctl='define'
-d_shmdt='define'
-d_shmget='define'
-d_sigaction='define'
-d_siginfo_si_addr='define'
-d_siginfo_si_band='define'
-d_siginfo_si_errno='define'
-d_siginfo_si_fd='define'
-d_siginfo_si_pid='define'
-d_siginfo_si_status='define'
-d_siginfo_si_uid='define'
-d_siginfo_si_value='define'
-d_signbit='define'
-d_sigprocmask='define'
-d_sigsetjmp='define'
-d_sin6_scope_id='define'
-d_sitearch='define'
-d_snprintf='define'
-d_sockaddr_in6='define'
-d_sockaddr_sa_len='undef'
-d_sockatmark='define'
-d_sockatmarkproto='define'
-d_socket='define'
-d_socklen_t='define'
-d_sockpair='define'
-d_socks5_init='undef'
-d_sprintf_returns_strlen='define'
-d_sqrtl='define'
-d_srand48_r='define'
-d_srandom_r='define'
-d_sresgproto='define'
-d_sresuproto='define'
-d_stat='define'
-d_statblks='define'
-d_statfs_f_flags='define'
-d_statfs_s='define'
-d_static_inline='define'
-d_statvfs='define'
-d_stdio_cnt_lval='undef'
-d_stdio_ptr_lval='undef'
-d_stdio_ptr_lval_nochange_cnt='undef'
-d_stdio_ptr_lval_sets_cnt='undef'
-d_stdio_stream_array='undef'
-d_stdiobase='undef'
-d_stdstdio='undef'
-d_strchr='define'
-d_strcoll='define'
-d_strctcpy='define'
-d_strerrm='strerror(e)'
-d_strerror='define'
-d_strerror_l='define'
-d_strerror_r='define'
-d_strftime='define'
-d_strlcat='undef'
-d_strlcpy='undef'
-d_strtod='define'
-d_strtol='define'
-d_strtold='define'
-d_strtoll='define'
-d_strtoq='define'
-d_strtoul='define'
-d_strtoull='define'
-d_strtouq='define'
-d_strxfrm='define'
-d_suidsafe='undef'
-d_symlink='define'
-d_syscall='define'
-d_syscallproto='define'
-d_sysconf='define'
-d_sysernlst=''
-d_syserrlst='define'
-d_system='define'
-d_tcgetpgrp='define'
-d_tcsetpgrp='define'
-d_telldir='define'
-d_telldirproto='define'
-d_tgamma='define'
-d_time='define'
-d_timegm='define'
-d_times='define'
-d_tm_tm_gmtoff='define'
-d_tm_tm_zone='define'
-d_tmpnam_r='define'
-d_trunc='define'
-d_truncate='define'
-d_truncl='define'
-d_ttyname_r='define'
-d_tzname='define'
-d_u32align='define'
-d_ualarm='undef'
-d_umask='define'
-d_uname='define'
-d_union_semun='undef'
-d_unordered='undef'
-d_unsetenv='define'
-d_uselocale='define'
-d_usleep='define'
-d_usleepproto='define'
-d_ustat='define'
-d_vendorarch='define'
-d_vendorbin='define'
-d_vendorlib='define'
-d_vendorscript='define'
-d_vfork='undef'
-d_void_closedir='undef'
-d_voidsig='define'
-d_voidtty=''
-d_volatile='define'
-d_vprintf='define'
-d_vsnprintf='define'
-d_wait4='define'
-d_waitpid='define'
-d_wcscmp='define'
-d_wcstombs='define'
-d_wcsxfrm='define'
-d_wctomb='define'
-d_writev='define'
-d_xenix='undef'
-date='date'
-db_hashtype='u_int32_t'
-db_prefixtype='size_t'
-db_version_major='5'
-db_version_minor='3'
-db_version_patch='28'
-default_inc_excludes_dot='define'
-direntrytype='struct dirent'
-dlext='so'
-dlsrc='dl_dlopen.xs'
-doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f'
-doublekind='3'
-doublemantbits='52'
-doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff'
-doublesize='8'
-drand01='Perl_drand48()'
-drand48_r_proto='REENTRANT_PROTO_I_ST'
-dtrace=''
-dtraceobject=''
-dtracexnolibs=''
-dynamic_ext='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate Unicode/Normalize XS/APItest XS/Typemap arybase attributes mro re threads threads/shared'
-eagain='EAGAIN'
-ebcdic='undef'
-echo='echo'
-egrep='egrep'
-emacs=''
-endgrent_r_proto='0'
-endhostent_r_proto='0'
-endnetent_r_proto='0'
-endprotoent_r_proto='0'
-endpwent_r_proto='0'
-endservent_r_proto='0'
-eunicefix=':'
-exe_ext=''
-expr='expr'
-extensions='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File ODBM_File Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate Unicode/Normalize XS/APItest XS/Typemap arybase attributes mro re threads threads/shared Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators version'
-extern_C='extern'
-extras=''
-fflushNULL='define'
-fflushall='undef'
-find=''
-firstmakefile='makefile'
-flex=''
-fpossize='16'
-fpostype='fpos_t'
-freetype='void'
-from=':'
-full_ar='/usr/bin/ar'
-full_csh='csh'
-full_sed='/bin/sed'
-gccansipedantic=''
-gccosandvers=''
-gccversion='7.3.0'
-getgrent_r_proto='REENTRANT_PROTO_I_SBWR'
-getgrgid_r_proto='REENTRANT_PROTO_I_TSBWR'
-getgrnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-gethostbyaddr_r_proto='REENTRANT_PROTO_I_TsISBWRE'
-gethostbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
-gethostent_r_proto='REENTRANT_PROTO_I_SBWRE'
-getlogin_r_proto='REENTRANT_PROTO_I_BW'
-getnetbyaddr_r_proto='REENTRANT_PROTO_I_uISBWRE'
-getnetbyname_r_proto='REENTRANT_PROTO_I_CSBWRE'
-getnetent_r_proto='REENTRANT_PROTO_I_SBWRE'
-getprotobyname_r_proto='REENTRANT_PROTO_I_CSBWR'
-getprotobynumber_r_proto='REENTRANT_PROTO_I_ISBWR'
-getprotoent_r_proto='REENTRANT_PROTO_I_SBWR'
-getpwent_r_proto='REENTRANT_PROTO_I_SBWR'
-getpwnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-getpwuid_r_proto='REENTRANT_PROTO_I_TSBWR'
-getservbyname_r_proto='REENTRANT_PROTO_I_CCSBWR'
-getservbyport_r_proto='REENTRANT_PROTO_I_ICSBWR'
-getservent_r_proto='REENTRANT_PROTO_I_SBWR'
-getspnam_r_proto='REENTRANT_PROTO_I_CSBWR'
-gidformat='"u"'
-gidsign='1'
-gidsize='4'
-gidtype='gid_t'
-glibpth='/usr/shlib /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib '
-gmake='gmake'
-gmtime_r_proto='REENTRANT_PROTO_S_TS'
-gnulibc_version='2.27'
-grep='grep'
-groupcat='cat /etc/group'
-groupstype='gid_t'
-gzip='gzip'
-h_fcntl='false'
-h_sysfile='true'
-hint='recommended'
-hostcat='cat /etc/hosts'
-hostgenerate=''
-hostosname=''
-hostperl=''
-html1dir=' '
-html1direxp=''
-html3dir=' '
-html3direxp=''
-i16size='2'
-i16type='short'
-i32size='4'
-i32type='int'
-i64size='8'
-i64type='long'
-i8size='1'
-i8type='signed char'
-i_arpainet='define'
-i_assert='define'
-i_bfd='undef'
-i_bsdioctl=''
-i_crypt='define'
-i_db='define'
-i_dbm='define'
-i_dirent='define'
-i_dlfcn='define'
-i_execinfo='define'
-i_fcntl='undef'
-i_fenv='define'
-i_float='define'
-i_fp='undef'
-i_fp_class='undef'
-i_gdbm='define'
-i_gdbm_ndbm='define'
-i_gdbmndbm='undef'
-i_grp='define'
-i_ieeefp='undef'
-i_inttypes='define'
-i_langinfo='define'
-i_libutil='undef'
-i_limits='define'
-i_locale='define'
-i_machcthr='undef'
-i_malloc='define'
-i_mallocmalloc='undef'
-i_math='define'
-i_memory='undef'
-i_mntent='define'
-i_ndbm='define'
-i_netdb='define'
-i_neterrno='undef'
-i_netinettcp='define'
-i_niin='define'
-i_poll='define'
-i_prot='undef'
-i_pthread='define'
-i_pwd='define'
-i_quadmath='define'
-i_rpcsvcdbm='undef'
-i_sgtty='undef'
-i_shadow='define'
-i_socks='undef'
-i_stdarg='define'
-i_stdbool='define'
-i_stddef='define'
-i_stdint='define'
-i_stdlib='define'
-i_string='define'
-i_sunmath='undef'
-i_sysaccess='undef'
-i_sysdir='define'
-i_sysfile='define'
-i_sysfilio='undef'
-i_sysin='undef'
-i_sysioctl='define'
-i_syslog='define'
-i_sysmman='define'
-i_sysmode='undef'
-i_sysmount='define'
-i_sysndir='undef'
-i_sysparam='define'
-i_syspoll='define'
-i_sysresrc='define'
-i_syssecrt='undef'
-i_sysselct='define'
-i_syssockio='undef'
-i_sysstat='define'
-i_sysstatfs='define'
-i_sysstatvfs='define'
-i_systime='define'
-i_systimek='undef'
-i_systimes='define'
-i_systypes='define'
-i_sysuio='define'
-i_sysun='define'
-i_sysutsname='define'
-i_sysvfs='define'
-i_syswait='define'
-i_termio='undef'
-i_termios='define'
-i_time='define'
-i_unistd='define'
-i_ustat='define'
-i_utime='define'
-i_values='define'
-i_varargs='undef'
-i_varhdr='stdarg.h'
-i_vfork='undef'
-i_xlocale='undef'
-ignore_versioned_solibs='y'
-inc_version_list='5.26.0 5.26.0/x86_64-linux-gnu-thread-multi'
-inc_version_list_init='"5.26.0","5.26.0/x86_64-linux-gnu-thread-multi",0'
-incpath=''
-incpth='/usr/lib/gcc/x86_64-linux-gnu/7/include /usr/local/include /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/include'
-inews=''
-initialinstalllocation='/usr/bin'
-installarchlib='/usr/lib/x86_64-linux-gnu/perl/5.26'
-installbin='/usr/bin'
-installhtml1dir=''
-installhtml3dir=''
-installman1dir='/usr/share/man/man1'
-installman3dir='/usr/share/man/man3'
-installprefix='/usr'
-installprefixexp='/usr'
-installprivlib='/usr/share/perl/5.26'
-installscript='/usr/bin'
-installsitearch='/usr/local/lib/x86_64-linux-gnu/perl/5.26.1'
-installsitebin='/usr/local/bin'
-installsitehtml1dir=''
-installsitehtml3dir=''
-installsitelib='/usr/local/share/perl/5.26.1'
-installsiteman1dir='/usr/local/man/man1'
-installsiteman3dir='/usr/local/man/man3'
-installsitescript='/usr/local/bin'
-installstyle='lib/perl5'
-installusrbinperl='undef'
-installvendorarch='/usr/lib/x86_64-linux-gnu/perl5/5.26'
-installvendorbin='/usr/bin'
-installvendorhtml1dir=''
-installvendorhtml3dir=''
-installvendorlib='/usr/share/perl5'
-installvendorman1dir='/usr/share/man/man1'
-installvendorman3dir='/usr/share/man/man3'
-installvendorscript='/usr/bin'
-intsize='4'
-issymlink='test -h'
-ivdformat='"ld"'
-ivsize='8'
-ivtype='long'
-known_extensions='Amiga/ARexx Amiga/Exec Archive/Tar Attribute/Handlers AutoLoader B B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Compress/Raw/Bzip2 Compress/Raw/Zlib Config/Perl/V Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Devel/SelfStubber Digest Digest/MD5 Digest/SHA Dumpvalue Encode Env Errno Exporter ExtUtils/CBuilder ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS Fcntl File/DosGlob File/Fetch File/Find File/Glob File/Path File/Temp FileCache Filter/Simple Filter/Util/Call GDBM_File Getopt/Long HTTP/Tiny Hash/Util Hash/Util/FieldHash I18N/Collate I18N/LangTags I18N/Langinfo IO IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 IPC/SysV JSON/PP List/Util Locale/Codes Locale/Maketext Locale/Maketext/Simple MIME/Base64 Math/BigInt Math/BigInt/FastCalc Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NDBM_File NEXT Net/Ping ODBM_File Opcode POSIX Params/Check Perl/OSType PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage SDBM_File Safe Search/Dict SelfLoader Socket Storable Sys/Hostname Sys/Syslog Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Hash/NamedCapture Tie/Memoize Tie/RefHash Time/HiRes Time/Local Time/Piece Unicode/Collate Unicode/Normalize VMS/DCLsym VMS/Filespec VMS/Stdio Win32 Win32API/File Win32CORE XS/APItest XS/Typemap XSLoader arybase attributes autodie autouse base bignum constant encoding/warnings experimental if lib libnet mro parent perlfaq podlators re threads threads/shared version '
-ksh=''
-ld='x86_64-linux-gnu-gcc'
-ld_can_script='define'
-lddlflags='-shared -L/usr/local/lib -fstack-protector-strong'
-ldflags=' -fstack-protector-strong -L/usr/local/lib'
-ldflags_uselargefiles=''
-ldlibpthname='LD_LIBRARY_PATH'
-less='less'
-lib_ext='.a'
-libc='libc-2.27.so'
-libdb_needs_pthread='N'
-libperl='libperl.a'
-libpth='/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib'
-libs='-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt'
-libsdirs=' /usr/lib/x86_64-linux-gnu'
-libsfiles=' libgdbm.so libgdbm_compat.so libdb.so libdl.so libm.so libpthread.so libc.so libcrypt.so'
-libsfound=' /usr/lib/x86_64-linux-gnu/libgdbm.so /usr/lib/x86_64-linux-gnu/libgdbm_compat.so /usr/lib/x86_64-linux-gnu/libdb.so /usr/lib/x86_64-linux-gnu/libdl.so /usr/lib/x86_64-linux-gnu/libm.so /usr/lib/x86_64-linux-gnu/libpthread.so /usr/lib/x86_64-linux-gnu/libc.so /usr/lib/x86_64-linux-gnu/libcrypt.so'
-libspath=' /usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/7/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib'
-libswanted='gdbm gdbm_compat db dl m pthread c crypt gdbm_compat'
-libswanted_uselargefiles=''
-line=''
-lint=''
-lkflags=''
-ln='ln'
-lns='/bin/ln -s'
-localtime_r_proto='REENTRANT_PROTO_S_TS'
-locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
-loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
-longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
-longdblkind='3'
-longdblmantbits='64'
-longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
-longdblsize='16'
-longlongsize='8'
-longsize='8'
-lp=''
-lpr=''
-ls='ls'
-lseeksize='8'
-lseektype='off_t'
-mail=''
-mailx=''
-make='make'
-make_set_make='#'
-mallocobj=''
-mallocsrc=''
-malloctype='void *'
-man1dir='/usr/share/man/man1'
-man1direxp='/usr/share/man/man1'
-man1ext='1p'
-man3dir='/usr/share/man/man3'
-man3direxp='/usr/share/man/man3'
-man3ext='3pm'
-mips_type=''
-mistrustnm=''
-mkdir='mkdir'
-mmaptype='void *'
-modetype='mode_t'
-more='more'
-multiarch='undef'
-mv=''
-myarchname='x86_64-linux'
-mydomain=''
-myhostname='localhost'
-myuname='linux localhost 4.9.0 #1 smp debian 4.9.0 x86_64 gnulinux '
-n='-n'
-need_va_copy='define'
-netdb_hlen_type='size_t'
-netdb_host_type='char *'
-netdb_name_type='const char *'
-netdb_net_type='in_addr_t'
-nm='nm'
-nm_opt=''
-nm_so_opt='--dynamic'
-nonxs_ext='Archive/Tar Attribute/Handlers AutoLoader B/Debug CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Params/Check Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators version'
-nroff='nroff'
-nvEUformat='"E"'
-nvFUformat='"F"'
-nvGUformat='"G"'
-nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
-nv_preserves_uv_bits='53'
-nveformat='"e"'
-nvfformat='"f"'
-nvgformat='"g"'
-nvmantbits='52'
-nvsize='8'
-nvtype='double'
-o_nonblock='O_NONBLOCK'
-obj_ext='.o'
-old_pthread_create_joinable=''
-optimize='-O2 -g'
-orderlib='false'
-osname='linux'
-osvers='4.9.0'
-otherlibdirs='/usr/lib/x86_64-linux-gnu/perl-base'
-package='perl5'
-pager='/usr/bin/sensible-pager'
-passcat='cat /etc/passwd'
-patchlevel='26'
-path_sep=':'
-perl='perl'
-perl5='/usr/bin/perl'
-perl_patchlevel=''
-perl_static_inline='static __inline__'
-perladmin='root@localhost'
-perllibs='-ldl -lm -lpthread -lc -lcrypt'
-perlpath='/usr/bin/perl'
-pg='pg'
-phostname='hostname'
-pidtype='pid_t'
-plibpth='/lib/x86_64-linux-gnu/7 /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu/7 /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /usr/lib'
-pmake=''
-pr=''
-prefix='/usr'
-prefixexp='/usr'
-privlib='/usr/share/perl/5.26'
-privlibexp='/usr/share/perl/5.26'
-procselfexe='"/proc/self/exe"'
-prototype='define'
-ptrsize='8'
-quadkind='2'
-quadtype='long'
-randbits='48'
-randfunc='Perl_drand48'
-random_r_proto='REENTRANT_PROTO_I_St'
-randseedtype='U32'
-ranlib=':'
-rd_nodata='-1'
-readdir64_r_proto='REENTRANT_PROTO_I_TSR'
-readdir_r_proto='REENTRANT_PROTO_I_TSR'
-revision='5'
-rm='rm'
-rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*'
-rmail=''
-run=''
-runnm='false'
-sGMTIME_max='67768036191676799'
-sGMTIME_min='-62167219200'
-sLOCALTIME_max='67768036191676799'
-sLOCALTIME_min='-62167219200'
-sPRIEUldbl='"LE"'
-sPRIFUldbl='"LF"'
-sPRIGUldbl='"LG"'
-sPRIXU64='"lX"'
-sPRId64='"ld"'
-sPRIeldbl='"Le"'
-sPRIfldbl='"Lf"'
-sPRIgldbl='"Lg"'
-sPRIi64='"li"'
-sPRIo64='"lo"'
-sPRIu64='"lu"'
-sPRIx64='"lx"'
-sSCNfldbl='"Lf"'
-sched_yield='sched_yield()'
-scriptdir='/usr/bin'
-scriptdirexp='/usr/bin'
-sed='sed'
-seedfunc='Perl_drand48_init'
-selectminbits='64'
-selecttype='fd_set *'
-sendmail=''
-setgrent_r_proto='0'
-sethostent_r_proto='0'
-setlocale_r_proto='0'
-setnetent_r_proto='0'
-setprotoent_r_proto='0'
-setpwent_r_proto='0'
-setservent_r_proto='0'
-sh='/bin/sh'
-shar=''
-sharpbang='#!'
-shmattype='void *'
-shortsize='2'
-shrpenv=''
-shsharp='true'
-sig_count='65'
-sig_name='ZERO HUP INT QUIT ILL TRAP ABRT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS NUM32 NUM33 RTMIN NUM35 NUM36 NUM37 NUM38 NUM39 NUM40 NUM41 NUM42 NUM43 NUM44 NUM45 NUM46 NUM47 NUM48 NUM49 NUM50 NUM51 NUM52 NUM53 NUM54 NUM55 NUM56 NUM57 NUM58 NUM59 NUM60 NUM61 NUM62 NUM63 RTMAX IOT CLD POLL UNUSED '
-sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "SYS", "NUM32", "NUM33", "RTMIN", "NUM35", "NUM36", "NUM37", "NUM38", "NUM39", "NUM40", "NUM41", "NUM42", "NUM43", "NUM44", "NUM45", "NUM46", "NUM47", "NUM48", "NUM49", "NUM50", "NUM51", "NUM52", "NUM53", "NUM54", "NUM55", "NUM56", "NUM57", "NUM58", "NUM59", "NUM60", "NUM61", "NUM62", "NUM63", "RTMAX", "IOT", "CLD", "POLL", "UNUSED", 0'
-sig_num='0 1 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 6 17 29 31 '
-sig_num_init='0, 1, 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, 6, 17, 29, 31, 0'
-sig_size='69'
-signal_t='void'
-sitearch='/usr/local/lib/x86_64-linux-gnu/perl/5.26.1'
-sitearchexp='/usr/local/lib/x86_64-linux-gnu/perl/5.26.1'
-sitebin='/usr/local/bin'
-sitebinexp='/usr/local/bin'
-sitehtml1dir=''
-sitehtml1direxp=''
-sitehtml3dir=''
-sitehtml3direxp=''
-sitelib='/usr/local/share/perl/5.26.1'
-sitelib_stem=''
-sitelibexp='/usr/local/share/perl/5.26.1'
-siteman1dir='/usr/local/man/man1'
-siteman1direxp='/usr/local/man/man1'
-siteman3dir='/usr/local/man/man3'
-siteman3direxp='/usr/local/man/man3'
-siteprefix='/usr/local'
-siteprefixexp='/usr/local'
-sitescript='/usr/local/bin'
-sitescriptexp='/usr/local/bin'
-sizesize='8'
-sizetype='size_t'
-sleep=''
-smail=''
-so='so'
-sockethdr=''
-socketlib=''
-socksizetype='socklen_t'
-sort='sort'
-spackage='Perl5'
-spitshell='cat'
-srand48_r_proto='REENTRANT_PROTO_I_LS'
-srandom_r_proto='REENTRANT_PROTO_I_TS'
-src='.'
-ssizetype='ssize_t'
-st_ino_sign='1'
-st_ino_size='8'
-startperl='#!/usr/bin/perl'
-startsh='#!/bin/sh'
-static_ext=' '
-stdchar='char'
-stdio_base='((fp)->_base)'
-stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)'
-stdio_cnt='((fp)->_cnt)'
-stdio_filbuf=''
-stdio_ptr='((fp)->_ptr)'
-stdio_stream_array=''
-strerror_r_proto='REENTRANT_PROTO_B_IBW'
-strings='/usr/include/string.h'
-submit=''
-subversion='1'
-sysman='/usr/share/man/man1'
-sysroot=''
-tail=''
-tar=''
-targetarch=''
-targetdir=''
-targetenv=''
-targethost=''
-targetmkdir=''
-targetport=''
-targetsh='/bin/sh'
-tbl=''
-tee=''
-test='test'
-timeincl='/usr/include/x86_64-linux-gnu/sys/time.h /usr/include/time.h '
-timetype='time_t'
-tmpnam_r_proto='REENTRANT_PROTO_B_B'
-to=':'
-touch='touch'
-tr='tr'
-trnl='\n'
-troff=''
-ttyname_r_proto='REENTRANT_PROTO_I_IBW'
-u16size='2'
-u16type='unsigned short'
-u32size='4'
-u32type='unsigned int'
-u64size='8'
-u64type='unsigned long'
-u8size='1'
-u8type='unsigned char'
-uidformat='"u"'
-uidsign='1'
-uidsize='4'
-uidtype='uid_t'
-uname='uname'
-uniq='uniq'
-uquadtype='unsigned long'
-use5005threads='undef'
-use64bitall='define'
-use64bitint='define'
-usecbacktrace='undef'
-usecrosscompile='undef'
-usedevel='undef'
-usedl='define'
-usedtrace='undef'
-usefaststdio='undef'
-useithreads='define'
-usekernprocpathname='undef'
-uselargefiles='define'
-uselongdouble='undef'
-usemallocwrap='define'
-usemorebits='undef'
-usemultiplicity='define'
-usemymalloc='n'
-usenm='false'
-usensgetexecutablepath='undef'
-useopcode='true'
-useperlio='define'
-useposix='true'
-usequadmath='undef'
-usereentrant='undef'
-userelocatableinc='undef'
-useshrplib='false'
-usesitecustomize='undef'
-usesocks='undef'
-usethreads='define'
-usevendorprefix='define'
-useversionedarchname='undef'
-usevfork='false'
-usrinc='/usr/include'
-uuname=''
-uvXUformat='"lX"'
-uvoformat='"lo"'
-uvsize='8'
-uvtype='unsigned long'
-uvuformat='"lu"'
-uvxformat='"lx"'
-vaproto='define'
-vendorarch='/usr/lib/x86_64-linux-gnu/perl5/5.26'
-vendorarchexp='/usr/lib/x86_64-linux-gnu/perl5/5.26'
-vendorbin='/usr/bin'
-vendorbinexp='/usr/bin'
-vendorhtml1dir=' '
-vendorhtml1direxp=''
-vendorhtml3dir=' '
-vendorhtml3direxp=''
-vendorlib='/usr/share/perl5'
-vendorlib_stem=''
-vendorlibexp='/usr/share/perl5'
-vendorman1dir='/usr/share/man/man1'
-vendorman1direxp='/usr/share/man/man1'
-vendorman3dir='/usr/share/man/man3'
-vendorman3direxp='/usr/share/man/man3'
-vendorprefix='/usr'
-vendorprefixexp='/usr'
-vendorscript='/usr/bin'
-vendorscriptexp='/usr/bin'
-version='5.26.1'
-version_patchlevel_string='version 26 subversion 1'
-versiononly='undef'
-vi=''
-xlibpth='/usr/lib/386 /lib/386'
-yacc='yacc'
-yaccflags=''
-zcat=''
-zip='zip'
-!END!
-
-my $i = ord(8);
-foreach my $c (7,6,5,4,3,2,1) { $i <<= 8; $i |= ord($c); }
-our $byteorder = join('', unpack('aaaaaaaa', pack('L!', $i)));
-s/(byteorder=)(['"]).*?\2/$1$2$Config::byteorder$2/m;
-
-my $config_sh_len = length $_;
-
-our $Config_SH_expanded = "\n$_" . << 'EOVIRTUAL';
-ccflags_nolargefiles='-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include '
-ldflags_nolargefiles=' -fstack-protector-strong -L/usr/local/lib'
-libs_nolargefiles='-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt'
-libswanted_nolargefiles='gdbm gdbm_compat db dl m pthread c crypt gdbm_compat'
-ccwarnflags=' -Wall -Werror=declaration-after-statement -Wextra -Wc++-compat -Wwrite-strings'
-ccstdflags=' -std=c89'
-EOVIRTUAL
-eval {
- # do not have hairy conniptions if this isnt available
- require 'Config_git.pl';
- $Config_SH_expanded .= $Config::Git_Data;
- 1;
-} or warn "Warning: failed to load Config_git.pl, something strange about this perl...\n";
-
-# Search for it in the big string
-sub fetch_string {
- my($self, $key) = @_;
-
- return undef unless $Config_SH_expanded =~ /\n$key=\'(.*?)\'\n/s;
- # So we can say "if $Config{'foo'}".
- $self->{$key} = $1 eq 'undef' ? undef : $1;
-}
-
-my $prevpos = 0;
-
-sub FIRSTKEY {
- $prevpos = 0;
- substr($Config_SH_expanded, 1, index($Config_SH_expanded, '=') - 1 );
-}
-
-sub NEXTKEY {
- my $pos = index($Config_SH_expanded, qq('\n), $prevpos) + 2;
- my $len = index($Config_SH_expanded, "=", $pos) - $pos;
- $prevpos = $pos;
- $len > 0 ? substr($Config_SH_expanded, $pos, $len) : undef;
-}
-
-sub EXISTS {
- return 1 if exists($_[0]->{$_[1]});
-
- return(index($Config_SH_expanded, "\n$_[1]='") != -1
- );
-}
-
-sub STORE { die "\%Config::Config is read-only\n" }
-*DELETE = *CLEAR = \*STORE; # Typeglob aliasing uses less space
-
-sub config_sh {
- substr $Config_SH_expanded, 1, $config_sh_len;
-}
-
-sub config_re {
- my $re = shift;
- return map { chomp; $_ } grep eval{ /^(?:$re)=/ }, split /^/,
- $Config_SH_expanded;
-}
-
-sub config_vars {
- # implements -V:cfgvar option (see perlrun -V:)
- foreach (@_) {
- # find optional leading, trailing colons; and query-spec
- my ($notag,$qry,$lncont) = m/^(:)?(.*?)(:)?$/; # flags fore and aft,
- # map colon-flags to print decorations
- my $prfx = $notag ? '': "$qry="; # tag-prefix for print
- my $lnend = $lncont ? ' ' : ";\n"; # line ending for print
-
- # all config-vars are by definition \w only, any \W means regex
- if ($qry =~ /\W/) {
- my @matches = config_re($qry);
- print map "$_$lnend", @matches ? @matches : "$qry: not found" if !$notag;
- print map { s/\w+=//; "$_$lnend" } @matches ? @matches : "$qry: not found" if $notag;
- } else {
- my $v = (exists $Config::Config{$qry}) ? $Config::Config{$qry}
- : 'UNKNOWN';
- $v = 'undef' unless defined $v;
- print "${prfx}'${v}'$lnend";
- }
- }
-}
-
-# Called by the real AUTOLOAD
-sub launcher {
- undef &AUTOLOAD;
- goto \&$Config::AUTOLOAD;
-}
-
-1;
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Cwd.pm b/vendor/LeOS/tools-leos/common/perl-base/Cwd.pm
deleted file mode 100644
index 289e0918..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Cwd.pm
+++ /dev/null
@@ -1,697 +0,0 @@
-package Cwd;
-use strict;
-use Exporter;
-use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
-
-$VERSION = '3.67';
-my $xs_version = $VERSION;
-$VERSION =~ tr/_//d;
-
-@ISA = qw/ Exporter /;
-@EXPORT = qw(cwd getcwd fastcwd fastgetcwd);
-push @EXPORT, qw(getdcwd) if $^O eq 'MSWin32';
-@EXPORT_OK = qw(chdir abs_path fast_abs_path realpath fast_realpath);
-
-# sys_cwd may keep the builtin command
-
-# All the functionality of this module may provided by builtins,
-# there is no sense to process the rest of the file.
-# The best choice may be to have this in BEGIN, but how to return from BEGIN?
-
-if ($^O eq 'os2') {
- local $^W = 0;
-
- *cwd = defined &sys_cwd ? \&sys_cwd : \&_os2_cwd;
- *getcwd = \&cwd;
- *fastgetcwd = \&cwd;
- *fastcwd = \&cwd;
-
- *fast_abs_path = \&sys_abspath if defined &sys_abspath;
- *abs_path = \&fast_abs_path;
- *realpath = \&fast_abs_path;
- *fast_realpath = \&fast_abs_path;
-
- return 1;
-}
-
-# Need to look up the feature settings on VMS. The preferred way is to use the
-# VMS::Feature module, but that may not be available to dual life modules.
-
-my $use_vms_feature;
-BEGIN {
- if ($^O eq 'VMS') {
- if (eval { local $SIG{__DIE__};
- local @INC = @INC;
- pop @INC if $INC[-1] eq '.';
- require VMS::Feature; }) {
- $use_vms_feature = 1;
- }
- }
-}
-
-# Need to look up the UNIX report mode. This may become a dynamic mode
-# in the future.
-sub _vms_unix_rpt {
- my $unix_rpt;
- if ($use_vms_feature) {
- $unix_rpt = VMS::Feature::current("filename_unix_report");
- } else {
- my $env_unix_rpt = $ENV{'DECC$FILENAME_UNIX_REPORT'} || '';
- $unix_rpt = $env_unix_rpt =~ /^[ET1]/i;
- }
- return $unix_rpt;
-}
-
-# Need to look up the EFS character set mode. This may become a dynamic
-# mode in the future.
-sub _vms_efs {
- my $efs;
- if ($use_vms_feature) {
- $efs = VMS::Feature::current("efs_charset");
- } else {
- my $env_efs = $ENV{'DECC$EFS_CHARSET'} || '';
- $efs = $env_efs =~ /^[ET1]/i;
- }
- return $efs;
-}
-
-# If loading the XS stuff doesn't work, we can fall back to pure perl
-if(! defined &getcwd && defined &DynaLoader::boot_DynaLoader) {
- eval {#eval is questionable since we are handling potential errors like
- #"Cwd object version 3.48 does not match bootstrap parameter 3.50
- #at lib/DynaLoader.pm line 216." by having this eval
- if ( $] >= 5.006 ) {
- require XSLoader;
- XSLoader::load( __PACKAGE__, $xs_version);
- } else {
- require DynaLoader;
- push @ISA, 'DynaLoader';
- __PACKAGE__->bootstrap( $xs_version );
- }
- };
-}
-
-# Big nasty table of function aliases
-my %METHOD_MAP =
- (
- VMS =>
- {
- cwd => '_vms_cwd',
- getcwd => '_vms_cwd',
- fastcwd => '_vms_cwd',
- fastgetcwd => '_vms_cwd',
- abs_path => '_vms_abs_path',
- fast_abs_path => '_vms_abs_path',
- },
-
- MSWin32 =>
- {
- # We assume that &_NT_cwd is defined as an XSUB or in the core.
- cwd => '_NT_cwd',
- getcwd => '_NT_cwd',
- fastcwd => '_NT_cwd',
- fastgetcwd => '_NT_cwd',
- abs_path => 'fast_abs_path',
- realpath => 'fast_abs_path',
- },
-
- dos =>
- {
- cwd => '_dos_cwd',
- getcwd => '_dos_cwd',
- fastgetcwd => '_dos_cwd',
- fastcwd => '_dos_cwd',
- abs_path => 'fast_abs_path',
- },
-
- # QNX4. QNX6 has a $os of 'nto'.
- qnx =>
- {
- cwd => '_qnx_cwd',
- getcwd => '_qnx_cwd',
- fastgetcwd => '_qnx_cwd',
- fastcwd => '_qnx_cwd',
- abs_path => '_qnx_abs_path',
- fast_abs_path => '_qnx_abs_path',
- },
-
- cygwin =>
- {
- getcwd => 'cwd',
- fastgetcwd => 'cwd',
- fastcwd => 'cwd',
- abs_path => 'fast_abs_path',
- realpath => 'fast_abs_path',
- },
-
- epoc =>
- {
- cwd => '_epoc_cwd',
- getcwd => '_epoc_cwd',
- fastgetcwd => '_epoc_cwd',
- fastcwd => '_epoc_cwd',
- abs_path => 'fast_abs_path',
- },
-
- MacOS =>
- {
- getcwd => 'cwd',
- fastgetcwd => 'cwd',
- fastcwd => 'cwd',
- abs_path => 'fast_abs_path',
- },
-
- amigaos =>
- {
- getcwd => '_backtick_pwd',
- fastgetcwd => '_backtick_pwd',
- fastcwd => '_backtick_pwd',
- abs_path => 'fast_abs_path',
- }
- );
-
-$METHOD_MAP{NT} = $METHOD_MAP{MSWin32};
-
-# Find the pwd command in the expected locations. We assume these
-# are safe. This prevents _backtick_pwd() consulting $ENV{PATH}
-# so everything works under taint mode.
-my $pwd_cmd;
-if($^O ne 'MSWin32') {
- foreach my $try ('/bin/pwd',
- '/usr/bin/pwd',
- '/QOpenSys/bin/pwd', # OS/400 PASE.
- ) {
- if( -x $try ) {
- $pwd_cmd = $try;
- last;
- }
- }
-}
-
-# Android has a built-in pwd. Using $pwd_cmd will DTRT if
-# this perl was compiled with -Dd_useshellcmds, which is the
-# default for Android, but the block below is needed for the
-# miniperl running on the host when cross-compiling, and
-# potentially for native builds with -Ud_useshellcmds.
-if ($^O =~ /android/) {
- # If targetsh is executable, then we're either a full
- # perl, or a miniperl for a native build.
- if (-x $Config::Config{targetsh}) {
- $pwd_cmd = "$Config::Config{targetsh} -c pwd"
- }
- else {
- my $sh = $Config::Config{sh} || (-x '/system/bin/sh' ? '/system/bin/sh' : 'sh');
- $pwd_cmd = "$sh -c pwd"
- }
-}
-
-my $found_pwd_cmd = defined($pwd_cmd);
-unless ($pwd_cmd) {
- # Isn't this wrong? _backtick_pwd() will fail if someone has
- # pwd in their path but it is not /bin/pwd or /usr/bin/pwd?
- # See [perl #16774]. --jhi
- $pwd_cmd = 'pwd';
-}
-
-# Lazy-load Carp
-sub _carp { require Carp; Carp::carp(@_) }
-sub _croak { require Carp; Carp::croak(@_) }
-
-# The 'natural and safe form' for UNIX (pwd may be setuid root)
-sub _backtick_pwd {
-
- # Localize %ENV entries in a way that won't create new hash keys.
- # Under AmigaOS we don't want to localize as it stops perl from
- # finding 'sh' in the PATH.
- my @localize = grep exists $ENV{$_}, qw(PATH IFS CDPATH ENV BASH_ENV) if $^O ne "amigaos";
- local @ENV{@localize} if @localize;
-
- my $cwd = `$pwd_cmd`;
- # Belt-and-suspenders in case someone said "undef $/".
- local $/ = "\n";
- # `pwd` may fail e.g. if the disk is full
- chomp($cwd) if defined $cwd;
- $cwd;
-}
-
-# Since some ports may predefine cwd internally (e.g., NT)
-# we take care not to override an existing definition for cwd().
-
-unless ($METHOD_MAP{$^O}{cwd} or defined &cwd) {
- # The pwd command is not available in some chroot(2)'ed environments
- my $sep = $Config::Config{path_sep} || ':';
- my $os = $^O; # Protect $^O from tainting
-
- # Try again to find a pwd, this time searching the whole PATH.
- if (defined $ENV{PATH} and $os ne 'MSWin32') { # no pwd on Windows
- my @candidates = split($sep, $ENV{PATH});
- while (!$found_pwd_cmd and @candidates) {
- my $candidate = shift @candidates;
- $found_pwd_cmd = 1 if -x "$candidate/pwd";
- }
- }
-
- # MacOS has some special magic to make `pwd` work.
- if( $os eq 'MacOS' || $found_pwd_cmd )
- {
- *cwd = \&_backtick_pwd;
- }
- else {
- *cwd = \&getcwd;
- }
-}
-
-if ($^O eq 'cygwin') {
- # We need to make sure cwd() is called with no args, because it's
- # got an arg-less prototype and will die if args are present.
- local $^W = 0;
- my $orig_cwd = \&cwd;
- *cwd = sub { &$orig_cwd() }
-}
-
-# set a reasonable (and very safe) default for fastgetcwd, in case it
-# isn't redefined later (20001212 rspier)
-*fastgetcwd = \&cwd;
-
-# A non-XS version of getcwd() - also used to bootstrap the perl build
-# process, when miniperl is running and no XS loading happens.
-sub _perl_getcwd
-{
- abs_path('.');
-}
-
-# By John Bazik
-#
-# Usage: $cwd = &fastcwd;
-#
-# This is a faster version of getcwd. It's also more dangerous because
-# you might chdir out of a directory that you can't chdir back into.
-
-sub fastcwd_ {
- my($odev, $oino, $cdev, $cino, $tdev, $tino);
- my(@path, $path);
- local(*DIR);
-
- my($orig_cdev, $orig_cino) = stat('.');
- ($cdev, $cino) = ($orig_cdev, $orig_cino);
- for (;;) {
- my $direntry;
- ($odev, $oino) = ($cdev, $cino);
- CORE::chdir('..') || return undef;
- ($cdev, $cino) = stat('.');
- last if $odev == $cdev && $oino == $cino;
- opendir(DIR, '.') || return undef;
- for (;;) {
- $direntry = readdir(DIR);
- last unless defined $direntry;
- next if $direntry eq '.';
- next if $direntry eq '..';
-
- ($tdev, $tino) = lstat($direntry);
- last unless $tdev != $odev || $tino != $oino;
- }
- closedir(DIR);
- return undef unless defined $direntry; # should never happen
- unshift(@path, $direntry);
- }
- $path = '/' . join('/', @path);
- if ($^O eq 'apollo') { $path = "/".$path; }
- # At this point $path may be tainted (if tainting) and chdir would fail.
- # Untaint it then check that we landed where we started.
- $path =~ /^(.*)\z/s # untaint
- && CORE::chdir($1) or return undef;
- ($cdev, $cino) = stat('.');
- die "Unstable directory path, current directory changed unexpectedly"
- if $cdev != $orig_cdev || $cino != $orig_cino;
- $path;
-}
-if (not defined &fastcwd) { *fastcwd = \&fastcwd_ }
-
-# Keeps track of current working directory in PWD environment var
-# Usage:
-# use Cwd 'chdir';
-# chdir $newdir;
-
-my $chdir_init = 0;
-
-sub chdir_init {
- if ($ENV{'PWD'} and $^O ne 'os2' and $^O ne 'dos' and $^O ne 'MSWin32') {
- my($dd,$di) = stat('.');
- my($pd,$pi) = stat($ENV{'PWD'});
- if (!defined $dd or !defined $pd or $di != $pi or $dd != $pd) {
- $ENV{'PWD'} = cwd();
- }
- }
- else {
- my $wd = cwd();
- $wd = Win32::GetFullPathName($wd) if $^O eq 'MSWin32';
- $ENV{'PWD'} = $wd;
- }
- # Strip an automounter prefix (where /tmp_mnt/foo/bar == /foo/bar)
- if ($^O ne 'MSWin32' and $ENV{'PWD'} =~ m|(/[^/]+(/[^/]+/[^/]+))(.*)|s) {
- my($pd,$pi) = stat($2);
- my($dd,$di) = stat($1);
- if (defined $pd and defined $dd and $di == $pi and $dd == $pd) {
- $ENV{'PWD'}="$2$3";
- }
- }
- $chdir_init = 1;
-}
-
-sub chdir {
- my $newdir = @_ ? shift : ''; # allow for no arg (chdir to HOME dir)
- if ($^O eq "cygwin") {
- $newdir =~ s|\A///+|//|;
- $newdir =~ s|(?<=[^/])//+|/|g;
- }
- elsif ($^O ne 'MSWin32') {
- $newdir =~ s|///*|/|g;
- }
- chdir_init() unless $chdir_init;
- my $newpwd;
- if ($^O eq 'MSWin32') {
- # get the full path name *before* the chdir()
- $newpwd = Win32::GetFullPathName($newdir);
- }
-
- return 0 unless CORE::chdir $newdir;
-
- if ($^O eq 'VMS') {
- return $ENV{'PWD'} = $ENV{'DEFAULT'}
- }
- elsif ($^O eq 'MacOS') {
- return $ENV{'PWD'} = cwd();
- }
- elsif ($^O eq 'MSWin32') {
- $ENV{'PWD'} = $newpwd;
- return 1;
- }
-
- if (ref $newdir eq 'GLOB') { # in case a file/dir handle is passed in
- $ENV{'PWD'} = cwd();
- } elsif ($newdir =~ m#^/#s) {
- $ENV{'PWD'} = $newdir;
- } else {
- my @curdir = split(m#/#,$ENV{'PWD'});
- @curdir = ('') unless @curdir;
- my $component;
- foreach $component (split(m#/#, $newdir)) {
- next if $component eq '.';
- pop(@curdir),next if $component eq '..';
- push(@curdir,$component);
- }
- $ENV{'PWD'} = join('/',@curdir) || '/';
- }
- 1;
-}
-
-sub _perl_abs_path
-{
- my $start = @_ ? shift : '.';
- my($dotdots, $cwd, @pst, @cst, $dir, @tst);
-
- unless (@cst = stat( $start ))
- {
- _carp("stat($start): $!");
- return '';
- }
-
- unless (-d _) {
- # Make sure we can be invoked on plain files, not just directories.
- # NOTE that this routine assumes that '/' is the only directory separator.
-
- my ($dir, $file) = $start =~ m{^(.*)/(.+)$}
- or return cwd() . '/' . $start;
-
- # Can't use "-l _" here, because the previous stat was a stat(), not an lstat().
- if (-l $start) {
- my $link_target = readlink($start);
- die "Can't resolve link $start: $!" unless defined $link_target;
-
- require File::Spec;
- $link_target = $dir . '/' . $link_target
- unless File::Spec->file_name_is_absolute($link_target);
-
- return abs_path($link_target);
- }
-
- return $dir ? abs_path($dir) . "/$file" : "/$file";
- }
-
- $cwd = '';
- $dotdots = $start;
- do
- {
- $dotdots .= '/..';
- @pst = @cst;
- local *PARENT;
- unless (opendir(PARENT, $dotdots))
- {
- # probably a permissions issue. Try the native command.
- require File::Spec;
- return File::Spec->rel2abs( $start, _backtick_pwd() );
- }
- unless (@cst = stat($dotdots))
- {
- _carp("stat($dotdots): $!");
- closedir(PARENT);
- return '';
- }
- if ($pst[0] == $cst[0] && $pst[1] == $cst[1])
- {
- $dir = undef;
- }
- else
- {
- do
- {
- unless (defined ($dir = readdir(PARENT)))
- {
- _carp("readdir($dotdots): $!");
- closedir(PARENT);
- return '';
- }
- $tst[0] = $pst[0]+1 unless (@tst = lstat("$dotdots/$dir"))
- }
- while ($dir eq '.' || $dir eq '..' || $tst[0] != $pst[0] ||
- $tst[1] != $pst[1]);
- }
- $cwd = (defined $dir ? "$dir" : "" ) . "/$cwd" ;
- closedir(PARENT);
- } while (defined $dir);
- chop($cwd) unless $cwd eq '/'; # drop the trailing /
- $cwd;
-}
-
-my $Curdir;
-sub fast_abs_path {
- local $ENV{PWD} = $ENV{PWD} || ''; # Guard against clobberage
- my $cwd = getcwd();
- require File::Spec;
- my $path = @_ ? shift : ($Curdir ||= File::Spec->curdir);
-
- # Detaint else we'll explode in taint mode. This is safe because
- # we're not doing anything dangerous with it.
- ($path) = $path =~ /(.*)/s;
- ($cwd) = $cwd =~ /(.*)/s;
-
- unless (-e $path) {
- _croak("$path: No such file or directory");
- }
-
- unless (-d _) {
- # Make sure we can be invoked on plain files, not just directories.
-
- my ($vol, $dir, $file) = File::Spec->splitpath($path);
- return File::Spec->catfile($cwd, $path) unless length $dir;
-
- if (-l $path) {
- my $link_target = readlink($path);
- die "Can't resolve link $path: $!" unless defined $link_target;
-
- $link_target = File::Spec->catpath($vol, $dir, $link_target)
- unless File::Spec->file_name_is_absolute($link_target);
-
- return fast_abs_path($link_target);
- }
-
- return $dir eq File::Spec->rootdir
- ? File::Spec->catpath($vol, $dir, $file)
- : fast_abs_path(File::Spec->catpath($vol, $dir, '')) . '/' . $file;
- }
-
- if (!CORE::chdir($path)) {
- _croak("Cannot chdir to $path: $!");
- }
- my $realpath = getcwd();
- if (! ((-d $cwd) && (CORE::chdir($cwd)))) {
- _croak("Cannot chdir back to $cwd: $!");
- }
- $realpath;
-}
-
-# added function alias to follow principle of least surprise
-# based on previous aliasing. --tchrist 27-Jan-00
-*fast_realpath = \&fast_abs_path;
-
-# --- PORTING SECTION ---
-
-# VMS: $ENV{'DEFAULT'} points to default directory at all times
-# 06-Mar-1996 Charles Bailey bailey@newman.upenn.edu
-# Note: Use of Cwd::chdir() causes the logical name PWD to be defined
-# in the process logical name table as the default device and directory
-# seen by Perl. This may not be the same as the default device
-# and directory seen by DCL after Perl exits, since the effects
-# the CRTL chdir() function persist only until Perl exits.
-
-sub _vms_cwd {
- return $ENV{'DEFAULT'};
-}
-
-sub _vms_abs_path {
- return $ENV{'DEFAULT'} unless @_;
- my $path = shift;
-
- my $efs = _vms_efs;
- my $unix_rpt = _vms_unix_rpt;
-
- if (defined &VMS::Filespec::vmsrealpath) {
- my $path_unix = 0;
- my $path_vms = 0;
-
- $path_unix = 1 if ($path =~ m#(?<=\^)/#);
- $path_unix = 1 if ($path =~ /^\.\.?$/);
- $path_vms = 1 if ($path =~ m#[\[<\]]#);
- $path_vms = 1 if ($path =~ /^--?$/);
-
- my $unix_mode = $path_unix;
- if ($efs) {
- # In case of a tie, the Unix report mode decides.
- if ($path_vms == $path_unix) {
- $unix_mode = $unix_rpt;
- } else {
- $unix_mode = 0 if $path_vms;
- }
- }
-
- if ($unix_mode) {
- # Unix format
- return VMS::Filespec::unixrealpath($path);
- }
-
- # VMS format
-
- my $new_path = VMS::Filespec::vmsrealpath($path);
-
- # Perl expects directories to be in directory format
- $new_path = VMS::Filespec::pathify($new_path) if -d $path;
- return $new_path;
- }
-
- # Fallback to older algorithm if correct ones are not
- # available.
-
- if (-l $path) {
- my $link_target = readlink($path);
- die "Can't resolve link $path: $!" unless defined $link_target;
-
- return _vms_abs_path($link_target);
- }
-
- # may need to turn foo.dir into [.foo]
- my $pathified = VMS::Filespec::pathify($path);
- $path = $pathified if defined $pathified;
-
- return VMS::Filespec::rmsexpand($path);
-}
-
-sub _os2_cwd {
- my $pwd = `cmd /c cd`;
- chomp $pwd;
- $pwd =~ s:\\:/:g ;
- $ENV{'PWD'} = $pwd;
- return $pwd;
-}
-
-sub _win32_cwd_simple {
- my $pwd = `cd`;
- chomp $pwd;
- $pwd =~ s:\\:/:g ;
- $ENV{'PWD'} = $pwd;
- return $pwd;
-}
-
-sub _win32_cwd {
- my $pwd;
- $pwd = Win32::GetCwd();
- $pwd =~ s:\\:/:g ;
- $ENV{'PWD'} = $pwd;
- return $pwd;
-}
-
-*_NT_cwd = defined &Win32::GetCwd ? \&_win32_cwd : \&_win32_cwd_simple;
-
-sub _dos_cwd {
- my $pwd;
- if (!defined &Dos::GetCwd) {
- chomp($pwd = `command /c cd`);
- $pwd =~ s:\\:/:g ;
- } else {
- $pwd = Dos::GetCwd();
- }
- $ENV{'PWD'} = $pwd;
- return $pwd;
-}
-
-sub _qnx_cwd {
- local $ENV{PATH} = '';
- local $ENV{CDPATH} = '';
- local $ENV{ENV} = '';
- my $pwd = `/usr/bin/fullpath -t`;
- chomp $pwd;
- $ENV{'PWD'} = $pwd;
- return $pwd;
-}
-
-sub _qnx_abs_path {
- local $ENV{PATH} = '';
- local $ENV{CDPATH} = '';
- local $ENV{ENV} = '';
- my $path = @_ ? shift : '.';
- local *REALPATH;
-
- defined( open(REALPATH, '-|') || exec '/usr/bin/fullpath', '-t', $path ) or
- die "Can't open /usr/bin/fullpath: $!";
- my $realpath = ;
- close REALPATH;
- chomp $realpath;
- return $realpath;
-}
-
-sub _epoc_cwd {
- return $ENV{'PWD'} = EPOC::getcwd();
-}
-
-# Now that all the base-level functions are set up, alias the
-# user-level functions to the right places
-
-if (exists $METHOD_MAP{$^O}) {
- my $map = $METHOD_MAP{$^O};
- foreach my $name (keys %$map) {
- local $^W = 0; # assignments trigger 'subroutine redefined' warning
- no strict 'refs';
- *{$name} = \&{$map->{$name}};
- }
-}
-
-# In case the XS version doesn't load.
-*abs_path = \&_perl_abs_path unless defined &abs_path;
-*getcwd = \&_perl_getcwd unless defined &getcwd;
-
-# added function alias for those of us more
-# used to the libc function. --tchrist 27-Jan-00
-*realpath = \&abs_path;
-
-1;
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/DynaLoader.pm b/vendor/LeOS/tools-leos/common/perl-base/DynaLoader.pm
deleted file mode 100644
index d2705f15..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/DynaLoader.pm
+++ /dev/null
@@ -1,314 +0,0 @@
-# Generated from DynaLoader_pm.PL, this file is unique for every OS
-
-package DynaLoader;
-
-# And Gandalf said: 'Many folk like to know beforehand what is to
-# be set on the table; but those who have laboured to prepare the
-# feast like to keep their secret; for wonder makes the words of
-# praise louder.'
-
-# (Quote from Tolkien suggested by Anno Siegel.)
-#
-# See pod text at end of file for documentation.
-# See also ext/DynaLoader/README in source tree for other information.
-#
-# Tim.Bunce@ig.co.uk, August 1994
-
-BEGIN {
- $VERSION = '1.42';
-}
-
-use Config;
-
-# enable debug/trace messages from DynaLoader perl code
-$dl_debug = $ENV{PERL_DL_DEBUG} || 0 unless defined $dl_debug;
-
-#
-# Flags to alter dl_load_file behaviour. Assigned bits:
-# 0x01 make symbols available for linking later dl_load_file's.
-# (only known to work on Solaris 2 using dlopen(RTLD_GLOBAL))
-# (ignored under VMS; effect is built-in to image linking)
-# (ignored under Android; the linker always uses RTLD_LOCAL)
-#
-# This is called as a class method $module->dl_load_flags. The
-# definition here will be inherited and result on "default" loading
-# behaviour unless a sub-class of DynaLoader defines its own version.
-#
-
-sub dl_load_flags { 0x00 }
-
-($dl_dlext, $dl_so, $dlsrc) = @Config::Config{qw(dlext so dlsrc)};
-
-$do_expand = 0;
-
-@dl_require_symbols = (); # names of symbols we need
-@dl_library_path = (); # path to look for files
-
-#XSLoader.pm may have added elements before we were required
-#@dl_shared_objects = (); # shared objects for symbols we have
-#@dl_librefs = (); # things we have loaded
-#@dl_modules = (); # Modules we have loaded
-
-# Initialise @dl_library_path with the 'standard' library path
-# for this platform as determined by Configure.
-
-push(@dl_library_path, split(' ', $Config::Config{libpth}));
-
-my $ldlibpthname = $Config::Config{ldlibpthname};
-my $ldlibpthname_defined = defined $Config::Config{ldlibpthname};
-my $pthsep = $Config::Config{path_sep};
-
-# Add to @dl_library_path any extra directories we can gather from environment
-# during runtime.
-
-if ($ldlibpthname_defined &&
- exists $ENV{$ldlibpthname}) {
- push(@dl_library_path, split(/$pthsep/, $ENV{$ldlibpthname}));
-}
-
-# E.g. HP-UX supports both its native SHLIB_PATH *and* LD_LIBRARY_PATH.
-
-if ($ldlibpthname_defined &&
- $ldlibpthname ne 'LD_LIBRARY_PATH' &&
- exists $ENV{LD_LIBRARY_PATH}) {
- push(@dl_library_path, split(/$pthsep/, $ENV{LD_LIBRARY_PATH}));
-}
-
-# No prizes for guessing why we don't say 'bootstrap DynaLoader;' here.
-# NOTE: All dl_*.xs (including dl_none.xs) define a dl_error() XSUB
-boot_DynaLoader('DynaLoader') if defined(&boot_DynaLoader) &&
- !defined(&dl_error);
-
-if ($dl_debug) {
- print STDERR "DynaLoader.pm loaded (@INC, @dl_library_path)\n";
- print STDERR "DynaLoader not linked into this perl\n"
- unless defined(&boot_DynaLoader);
-}
-
-1; # End of main code
-
-sub croak { require Carp; Carp::croak(@_) }
-
-sub bootstrap_inherit {
- my $module = $_[0];
- local *isa = *{"$module\::ISA"};
- local @isa = (@isa, 'DynaLoader');
- # Cannot goto due to delocalization. Will report errors on a wrong line?
- bootstrap(@_);
-}
-
-sub bootstrap {
- # use local vars to enable $module.bs script to edit values
- local(@args) = @_;
- local($module) = $args[0];
- local(@dirs, $file);
-
- unless ($module) {
- require Carp;
- Carp::confess("Usage: DynaLoader::bootstrap(module)");
- }
-
- # A common error on platforms which don't support dynamic loading.
- # Since it's fatal and potentially confusing we give a detailed message.
- croak("Can't load module $module, dynamic loading not available in this perl.\n".
- " (You may need to build a new perl executable which either supports\n".
- " dynamic loading or has the $module module statically linked into it.)\n")
- unless defined(&dl_load_file);
-
-
- my @modparts = split(/::/,$module);
- my $modfname = $modparts[-1];
- my $modfname_orig = $modfname; # For .bs file search
-
- # Some systems have restrictions on files names for DLL's etc.
- # mod2fname returns appropriate file base name (typically truncated)
- # It may also edit @modparts if required.
- $modfname = &mod2fname(\@modparts) if defined &mod2fname;
-
-
-
- my $modpname = join('/',@modparts);
-
- print STDERR "DynaLoader::bootstrap for $module ",
- "(auto/$modpname/$modfname.$dl_dlext)\n"
- if $dl_debug;
-
- my $dir;
- foreach (@INC) {
-
- $dir = "$_/auto/$modpname";
-
- next unless -d $dir; # skip over uninteresting directories
-
- # check for common cases to avoid autoload of dl_findfile
- my $try = "$dir/$modfname.$dl_dlext";
- last if $file = ($do_expand) ? dl_expandspec($try) : ((-f $try) && $try);
-
- # no luck here, save dir for possible later dl_findfile search
- push @dirs, $dir;
- }
- # last resort, let dl_findfile have a go in all known locations
- $file = dl_findfile(map("-L$_",@dirs,@INC), $modfname) unless $file;
-
- croak("Can't locate loadable object for module $module in \@INC (\@INC contains: @INC)")
- unless $file; # wording similar to error from 'require'
-
-
- my $bootname = "boot_$module";
- $bootname =~ s/\W/_/g;
- @dl_require_symbols = ($bootname);
-
- # Execute optional '.bootstrap' perl script for this module.
- # The .bs file can be used to configure @dl_resolve_using etc to
- # match the needs of the individual module on this architecture.
- # N.B. The .bs file does not following the naming convention used
- # by mod2fname.
- my $bs = "$dir/$modfname_orig";
- $bs =~ s/(\.\w+)?(;\d*)?$/\.bs/; # look for .bs 'beside' the library
- if (-s $bs) { # only read file if it's not empty
- print STDERR "BS: $bs ($^O, $dlsrc)\n" if $dl_debug;
- eval { local @INC = ('.'); do $bs; };
- warn "$bs: $@\n" if $@;
- }
-
- my $boot_symbol_ref;
-
-
-
- # Many dynamic extension loading problems will appear to come from
- # this section of code: XYZ failed at line 123 of DynaLoader.pm.
- # Often these errors are actually occurring in the initialisation
- # C code of the extension XS file. Perl reports the error as being
- # in this perl code simply because this was the last perl code
- # it executed.
-
- my $flags = $module->dl_load_flags;
-
- my $libref = dl_load_file($file, $flags) or
- croak("Can't load '$file' for module $module: ".dl_error());
-
- push(@dl_librefs,$libref); # record loaded object
-
- $boot_symbol_ref = dl_find_symbol($libref, $bootname) or
- croak("Can't find '$bootname' symbol in $file\n");
-
- push(@dl_modules, $module); # record loaded module
-
- boot:
- my $xs = dl_install_xsub("${module}::bootstrap", $boot_symbol_ref, $file);
-
- # See comment block above
-
- push(@dl_shared_objects, $file); # record files loaded
-
- &$xs(@args);
-}
-
-sub dl_findfile {
- # This function does not automatically consider the architecture
- # or the perl library auto directories.
- my (@args) = @_;
- my (@dirs, $dir); # which directories to search
- my (@found); # full paths to real files we have found
- #my $dl_ext= 'so'; # $Config::Config{'dlext'} suffix for perl extensions
- #my $dl_so = 'so'; # $Config::Config{'so'} suffix for shared libraries
-
- print STDERR "dl_findfile(@args)\n" if $dl_debug;
-
- # accumulate directories but process files as they appear
- arg: foreach(@args) {
- # Special fast case: full filepath requires no search
-
-
- if (m:/: && -f $_) {
- push(@found,$_);
- last arg unless wantarray;
- next;
- }
-
-
- # Deal with directories first:
- # Using a -L prefix is the preferred option (faster and more robust)
- if (m:^-L:) { s/^-L//; push(@dirs, $_); next; }
-
- # Otherwise we try to try to spot directories by a heuristic
- # (this is a more complicated issue than it first appears)
- if (m:/: && -d $_) { push(@dirs, $_); next; }
-
-
-
- # Only files should get this far...
- my(@names, $name); # what filenames to look for
- if (m:-l: ) { # convert -lname to appropriate library name
- s/-l//;
- push(@names,"lib$_.$dl_so");
- push(@names,"lib$_.a");
- } else { # Umm, a bare name. Try various alternatives:
- # these should be ordered with the most likely first
- push(@names,"$_.$dl_dlext") unless m/\.$dl_dlext$/o;
- push(@names,"$_.$dl_so") unless m/\.$dl_so$/o;
-
- push(@names,"lib$_.$dl_so") unless m:/:;
- push(@names, $_);
- }
- my $dirsep = '/';
-
- foreach $dir (@dirs, @dl_library_path) {
- next unless -d $dir;
-
- foreach $name (@names) {
- my($file) = "$dir$dirsep$name";
- print STDERR " checking in $dir for $name\n" if $dl_debug;
- $file = ($do_expand) ? dl_expandspec($file) : (-f $file && $file);
- #$file = _check_file($file);
- if ($file) {
- push(@found, $file);
- next arg; # no need to look any further
- }
- }
- }
- }
- if ($dl_debug) {
- foreach(@dirs) {
- print STDERR " dl_findfile ignored non-existent directory: $_\n" unless -d $_;
- }
- print STDERR "dl_findfile found: @found\n";
- }
- return $found[0] unless wantarray;
- @found;
-}
-
-sub dl_expandspec {
- my($spec) = @_;
- # Optional function invoked if DynaLoader.pm sets $do_expand.
- # Most systems do not require or use this function.
- # Some systems may implement it in the dl_*.xs file in which case
- # this Perl version should be excluded at build time.
-
- # This function is designed to deal with systems which treat some
- # 'filenames' in a special way. For example VMS 'Logical Names'
- # (something like unix environment variables - but different).
- # This function should recognise such names and expand them into
- # full file paths.
- # Must return undef if $spec is invalid or file does not exist.
-
- my $file = $spec; # default output to input
-
- return undef unless -f $file;
- print STDERR "dl_expandspec($spec) => $file\n" if $dl_debug;
- $file;
-}
-
-sub dl_find_symbol_anywhere
-{
- my $sym = shift;
- my $libref;
- foreach $libref (@dl_librefs) {
- my $symref = dl_find_symbol($libref,$sym,1);
- return $symref if $symref;
- }
- return undef;
-}
-
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Errno.pm b/vendor/LeOS/tools-leos/common/perl-base/Errno.pm
deleted file mode 100644
index 91265055..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Errno.pm
+++ /dev/null
@@ -1,229 +0,0 @@
-# -*- buffer-read-only: t -*-
-#
-# This file is auto-generated by ext/Errno/Errno_pm.PL.
-# ***ANY*** changes here will be lost.
-#
-
-package Errno;
-require Exporter;
-use strict;
-
-our $VERSION = "1.28";
-$VERSION = eval $VERSION;
-our @ISA = 'Exporter';
-
-my %err;
-
-BEGIN {
- %err = (
- EPERM => 1,
- ENOENT => 2,
- ESRCH => 3,
- EINTR => 4,
- EIO => 5,
- ENXIO => 6,
- E2BIG => 7,
- ENOEXEC => 8,
- EBADF => 9,
- ECHILD => 10,
- EAGAIN => 11,
- EWOULDBLOCK => 11,
- ENOMEM => 12,
- EACCES => 13,
- EFAULT => 14,
- ENOTBLK => 15,
- EBUSY => 16,
- EEXIST => 17,
- EXDEV => 18,
- ENODEV => 19,
- ENOTDIR => 20,
- EISDIR => 21,
- EINVAL => 22,
- ENFILE => 23,
- EMFILE => 24,
- ENOTTY => 25,
- ETXTBSY => 26,
- EFBIG => 27,
- ENOSPC => 28,
- ESPIPE => 29,
- EROFS => 30,
- EMLINK => 31,
- EPIPE => 32,
- EDOM => 33,
- ERANGE => 34,
- EDEADLK => 35,
- EDEADLOCK => 35,
- ENAMETOOLONG => 36,
- ENOLCK => 37,
- ENOSYS => 38,
- ENOTEMPTY => 39,
- ELOOP => 40,
- ENOMSG => 42,
- EIDRM => 43,
- ECHRNG => 44,
- EL2NSYNC => 45,
- EL3HLT => 46,
- EL3RST => 47,
- ELNRNG => 48,
- EUNATCH => 49,
- ENOCSI => 50,
- EL2HLT => 51,
- EBADE => 52,
- EBADR => 53,
- EXFULL => 54,
- ENOANO => 55,
- EBADRQC => 56,
- EBADSLT => 57,
- EBFONT => 59,
- ENOSTR => 60,
- ENODATA => 61,
- ETIME => 62,
- ENOSR => 63,
- ENONET => 64,
- ENOPKG => 65,
- EREMOTE => 66,
- ENOLINK => 67,
- EADV => 68,
- ESRMNT => 69,
- ECOMM => 70,
- EPROTO => 71,
- EMULTIHOP => 72,
- EDOTDOT => 73,
- EBADMSG => 74,
- EOVERFLOW => 75,
- ENOTUNIQ => 76,
- EBADFD => 77,
- EREMCHG => 78,
- ELIBACC => 79,
- ELIBBAD => 80,
- ELIBSCN => 81,
- ELIBMAX => 82,
- ELIBEXEC => 83,
- EILSEQ => 84,
- ERESTART => 85,
- ESTRPIPE => 86,
- EUSERS => 87,
- ENOTSOCK => 88,
- EDESTADDRREQ => 89,
- EMSGSIZE => 90,
- EPROTOTYPE => 91,
- ENOPROTOOPT => 92,
- EPROTONOSUPPORT => 93,
- ESOCKTNOSUPPORT => 94,
- ENOTSUP => 95,
- EOPNOTSUPP => 95,
- EPFNOSUPPORT => 96,
- EAFNOSUPPORT => 97,
- EADDRINUSE => 98,
- EADDRNOTAVAIL => 99,
- ENETDOWN => 100,
- ENETUNREACH => 101,
- ENETRESET => 102,
- ECONNABORTED => 103,
- ECONNRESET => 104,
- ENOBUFS => 105,
- EISCONN => 106,
- ENOTCONN => 107,
- ESHUTDOWN => 108,
- ETOOMANYREFS => 109,
- ETIMEDOUT => 110,
- ECONNREFUSED => 111,
- EHOSTDOWN => 112,
- EHOSTUNREACH => 113,
- EALREADY => 114,
- EINPROGRESS => 115,
- ESTALE => 116,
- EUCLEAN => 117,
- ENOTNAM => 118,
- ENAVAIL => 119,
- EISNAM => 120,
- EREMOTEIO => 121,
- EDQUOT => 122,
- ENOMEDIUM => 123,
- EMEDIUMTYPE => 124,
- ECANCELED => 125,
- ENOKEY => 126,
- EKEYEXPIRED => 127,
- EKEYREVOKED => 128,
- EKEYREJECTED => 129,
- EOWNERDEAD => 130,
- ENOTRECOVERABLE => 131,
- ERFKILL => 132,
- EHWPOISON => 133,
- );
- # Generate proxy constant subroutines for all the values.
- # Well, almost all the values. Unfortunately we can't assume that at this
- # point that our symbol table is empty, as code such as if the parser has
- # seen code such as C, it will have created the
- # typeglob.
- # Doing this before defining @EXPORT_OK etc means that even if a platform is
- # crazy enough to define EXPORT_OK as an error constant, everything will
- # still work, because the parser will upgrade the PCS to a real typeglob.
- # We rely on the subroutine definitions below to update the internal caches.
- # Don't use %each, as we don't want a copy of the value.
- foreach my $name (keys %err) {
- if ($Errno::{$name}) {
- # We expect this to be reached fairly rarely, so take an approach
- # which uses the least compile time effort in the common case:
- eval "sub $name() { $err{$name} }; 1" or die $@;
- } else {
- $Errno::{$name} = \$err{$name};
- }
- }
-}
-
-our @EXPORT_OK = keys %err;
-
-our %EXPORT_TAGS = (
- POSIX => [qw(
- E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY
- EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
- EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
- EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
- EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS
- ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK
- ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
- EPFNOSUPPORT EPIPE EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART
- EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT
- ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV
- )],
-);
-
-sub TIEHASH { bless \%err }
-
-sub FETCH {
- my (undef, $errname) = @_;
- return "" unless exists $err{$errname};
- my $errno = $err{$errname};
- return $errno == $! ? $errno : 0;
-}
-
-sub STORE {
- require Carp;
- Carp::confess("ERRNO hash is read only!");
-}
-
-# This is the true return value
-*CLEAR = *DELETE = \*STORE; # Typeglob aliasing uses less space
-
-sub NEXTKEY {
- each %err;
-}
-
-sub FIRSTKEY {
- my $s = scalar keys %err; # initialize iterator
- each %err;
-}
-
-sub EXISTS {
- my (undef, $errname) = @_;
- exists $err{$errname};
-}
-
-sub _tie_it {
- tie %{$_[0]}, __PACKAGE__;
-}
-
-__END__
-
-# ex: set ro:
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Exporter.pm b/vendor/LeOS/tools-leos/common/perl-base/Exporter.pm
deleted file mode 100644
index b46dad47..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Exporter.pm
+++ /dev/null
@@ -1,98 +0,0 @@
-package Exporter;
-
-require 5.006;
-
-# Be lean.
-#use strict;
-#no strict 'refs';
-
-our $Debug = 0;
-our $ExportLevel = 0;
-our $Verbose ||= 0;
-our $VERSION = '5.72';
-our (%Cache);
-
-sub as_heavy {
- require Exporter::Heavy;
- # Unfortunately, this does not work if the caller is aliased as *name = \&foo
- # Thus the need to create a lot of identical subroutines
- my $c = (caller(1))[3];
- $c =~ s/.*:://;
- \&{"Exporter::Heavy::heavy_$c"};
-}
-
-sub export {
- goto &{as_heavy()};
-}
-
-sub import {
- my $pkg = shift;
- my $callpkg = caller($ExportLevel);
-
- if ($pkg eq "Exporter" and @_ and $_[0] eq "import") {
- *{$callpkg."::import"} = \&import;
- return;
- }
-
- # We *need* to treat @{"$pkg\::EXPORT_FAIL"} since Carp uses it :-(
- my $exports = \@{"$pkg\::EXPORT"};
- # But, avoid creating things if they don't exist, which saves a couple of
- # hundred bytes per package processed.
- my $fail = ${$pkg . '::'}{EXPORT_FAIL} && \@{"$pkg\::EXPORT_FAIL"};
- return export $pkg, $callpkg, @_
- if $Verbose or $Debug or $fail && @$fail > 1;
- my $export_cache = ($Cache{$pkg} ||= {});
- my $args = @_ or @_ = @$exports;
-
- if ($args and not %$export_cache) {
- s/^&//, $export_cache->{$_} = 1
- foreach (@$exports, @{"$pkg\::EXPORT_OK"});
- }
- my $heavy;
- # Try very hard not to use {} and hence have to enter scope on the foreach
- # We bomb out of the loop with last as soon as heavy is set.
- if ($args or $fail) {
- ($heavy = (/\W/ or $args and not exists $export_cache->{$_}
- or $fail and @$fail and $_ eq $fail->[0])) and last
- foreach (@_);
- } else {
- ($heavy = /\W/) and last
- foreach (@_);
- }
- return export $pkg, $callpkg, ($args ? @_ : ()) if $heavy;
- local $SIG{__WARN__} =
- sub {require Carp; &Carp::carp} if not $SIG{__WARN__};
- # shortcut for the common case of no type character
- *{"$callpkg\::$_"} = \&{"$pkg\::$_"} foreach @_;
-}
-
-# Default methods
-
-sub export_fail {
- my $self = shift;
- @_;
-}
-
-# Unfortunately, caller(1)[3] "does not work" if the caller is aliased as
-# *name = \&foo. Thus the need to create a lot of identical subroutines
-# Otherwise we could have aliased them to export().
-
-sub export_to_level {
- goto &{as_heavy()};
-}
-
-sub export_tags {
- goto &{as_heavy()};
-}
-
-sub export_ok_tags {
- goto &{as_heavy()};
-}
-
-sub require_version {
- goto &{as_heavy()};
-}
-
-1;
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Exporter/Heavy.pm b/vendor/LeOS/tools-leos/common/perl-base/Exporter/Heavy.pm
deleted file mode 100644
index 0d8338c1..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Exporter/Heavy.pm
+++ /dev/null
@@ -1,239 +0,0 @@
-package Exporter::Heavy;
-
-use strict;
-no strict 'refs';
-
-# On one line so MakeMaker will see it.
-require Exporter; our $VERSION = $Exporter::VERSION;
-
-#
-# We go to a lot of trouble not to 'require Carp' at file scope,
-# because Carp requires Exporter, and something has to give.
-#
-
-sub _rebuild_cache {
- my ($pkg, $exports, $cache) = @_;
- s/^&// foreach @$exports;
- @{$cache}{@$exports} = (1) x @$exports;
- my $ok = \@{"${pkg}::EXPORT_OK"};
- if (@$ok) {
- s/^&// foreach @$ok;
- @{$cache}{@$ok} = (1) x @$ok;
- }
-}
-
-sub heavy_export {
-
- # Save the old __WARN__ handler in case it was defined
- my $oldwarn = $SIG{__WARN__};
-
- # First make import warnings look like they're coming from the "use".
- local $SIG{__WARN__} = sub {
- # restore it back so proper stacking occurs
- local $SIG{__WARN__} = $oldwarn;
- my $text = shift;
- if ($text =~ s/ at \S*Exporter\S*.pm line \d+.*\n//) {
- require Carp;
- local $Carp::CarpLevel = 1; # ignore package calling us too.
- Carp::carp($text);
- }
- else {
- warn $text;
- }
- };
- local $SIG{__DIE__} = sub {
- require Carp;
- local $Carp::CarpLevel = 1; # ignore package calling us too.
- Carp::croak("$_[0]Illegal null symbol in \@${1}::EXPORT")
- if $_[0] =~ /^Unable to create sub named "(.*?)::"/;
- };
-
- my($pkg, $callpkg, @imports) = @_;
- my($type, $sym, $cache_is_current, $oops);
- my($exports, $export_cache) = (\@{"${pkg}::EXPORT"},
- $Exporter::Cache{$pkg} ||= {});
-
- if (@imports) {
- if (!%$export_cache) {
- _rebuild_cache ($pkg, $exports, $export_cache);
- $cache_is_current = 1;
- }
-
- if (grep m{^[/!:]}, @imports) {
- my $tagsref = \%{"${pkg}::EXPORT_TAGS"};
- my $tagdata;
- my %imports;
- my($remove, $spec, @names, @allexports);
- # negated first item implies starting with default set:
- unshift @imports, ':DEFAULT' if $imports[0] =~ m/^!/;
- foreach $spec (@imports){
- $remove = $spec =~ s/^!//;
-
- if ($spec =~ s/^://){
- if ($spec eq 'DEFAULT'){
- @names = @$exports;
- }
- elsif ($tagdata = $tagsref->{$spec}) {
- @names = @$tagdata;
- }
- else {
- warn qq["$spec" is not defined in %${pkg}::EXPORT_TAGS];
- ++$oops;
- next;
- }
- }
- elsif ($spec =~ m:^/(.*)/$:){
- my $patn = $1;
- @allexports = keys %$export_cache unless @allexports; # only do keys once
- @names = grep(/$patn/, @allexports); # not anchored by default
- }
- else {
- @names = ($spec); # is a normal symbol name
- }
-
- warn "Import ".($remove ? "del":"add").": @names "
- if $Exporter::Verbose;
-
- if ($remove) {
- foreach $sym (@names) { delete $imports{$sym} }
- }
- else {
- @imports{@names} = (1) x @names;
- }
- }
- @imports = keys %imports;
- }
-
- my @carp;
- foreach $sym (@imports) {
- if (!$export_cache->{$sym}) {
- if ($sym =~ m/^\d/) {
- $pkg->VERSION($sym); # inherit from UNIVERSAL
- # If the version number was the only thing specified
- # then we should act as if nothing was specified:
- if (@imports == 1) {
- @imports = @$exports;
- last;
- }
- # We need a way to emulate 'use Foo ()' but still
- # allow an easy version check: "use Foo 1.23, ''";
- if (@imports == 2 and !$imports[1]) {
- @imports = ();
- last;
- }
- } elsif ($sym !~ s/^&// || !$export_cache->{$sym}) {
- # Last chance - see if they've updated EXPORT_OK since we
- # cached it.
-
- unless ($cache_is_current) {
- %$export_cache = ();
- _rebuild_cache ($pkg, $exports, $export_cache);
- $cache_is_current = 1;
- }
-
- if (!$export_cache->{$sym}) {
- # accumulate the non-exports
- push @carp,
- qq["$sym" is not exported by the $pkg module\n];
- $oops++;
- }
- }
- }
- }
- if ($oops) {
- require Carp;
- Carp::croak("@{carp}Can't continue after import errors");
- }
- }
- else {
- @imports = @$exports;
- }
-
- my($fail, $fail_cache) = (\@{"${pkg}::EXPORT_FAIL"},
- $Exporter::FailCache{$pkg} ||= {});
-
- if (@$fail) {
- if (!%$fail_cache) {
- # Build cache of symbols. Optimise the lookup by adding
- # barewords twice... both with and without a leading &.
- # (Technique could be applied to $export_cache at cost of memory)
- my @expanded = map { /^\w/ ? ($_, '&'.$_) : $_ } @$fail;
- warn "${pkg}::EXPORT_FAIL cached: @expanded" if $Exporter::Verbose;
- @{$fail_cache}{@expanded} = (1) x @expanded;
- }
- my @failed;
- foreach $sym (@imports) { push(@failed, $sym) if $fail_cache->{$sym} }
- if (@failed) {
- @failed = $pkg->export_fail(@failed);
- foreach $sym (@failed) {
- require Carp;
- Carp::carp(qq["$sym" is not implemented by the $pkg module ],
- "on this architecture");
- }
- if (@failed) {
- require Carp;
- Carp::croak("Can't continue after import errors");
- }
- }
- }
-
- warn "Importing into $callpkg from $pkg: ",
- join(", ",sort @imports) if $Exporter::Verbose;
-
- foreach $sym (@imports) {
- # shortcut for the common case of no type character
- (*{"${callpkg}::$sym"} = \&{"${pkg}::$sym"}, next)
- unless $sym =~ s/^(\W)//;
- $type = $1;
- no warnings 'once';
- *{"${callpkg}::$sym"} =
- $type eq '&' ? \&{"${pkg}::$sym"} :
- $type eq '$' ? \${"${pkg}::$sym"} :
- $type eq '@' ? \@{"${pkg}::$sym"} :
- $type eq '%' ? \%{"${pkg}::$sym"} :
- $type eq '*' ? *{"${pkg}::$sym"} :
- do { require Carp; Carp::croak("Can't export symbol: $type$sym") };
- }
-}
-
-sub heavy_export_to_level
-{
- my $pkg = shift;
- my $level = shift;
- (undef) = shift; # XXX redundant arg
- my $callpkg = caller($level);
- $pkg->export($callpkg, @_);
-}
-
-# Utility functions
-
-sub _push_tags {
- my($pkg, $var, $syms) = @_;
- my @nontag = ();
- my $export_tags = \%{"${pkg}::EXPORT_TAGS"};
- push(@{"${pkg}::$var"},
- map { $export_tags->{$_} ? @{$export_tags->{$_}}
- : scalar(push(@nontag,$_),$_) }
- (@$syms) ? @$syms : keys %$export_tags);
- if (@nontag and $^W) {
- # This may change to a die one day
- require Carp;
- Carp::carp(join(", ", @nontag)." are not tags of $pkg");
- }
-}
-
-sub heavy_require_version {
- my($self, $wanted) = @_;
- my $pkg = ref $self || $self;
- return ${pkg}->VERSION($wanted);
-}
-
-sub heavy_export_tags {
- _push_tags((caller)[0], "EXPORT", \@_);
-}
-
-sub heavy_export_ok_tags {
- _push_tags((caller)[0], "EXPORT_OK", \@_);
-}
-
-1;
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Fcntl.pm b/vendor/LeOS/tools-leos/common/perl-base/Fcntl.pm
deleted file mode 100644
index 80d7209e..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Fcntl.pm
+++ /dev/null
@@ -1,138 +0,0 @@
-package Fcntl;
-
-use strict;
-our($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-
-require Exporter;
-require XSLoader;
-@ISA = qw(Exporter);
-$VERSION = '1.13';
-
-XSLoader::load();
-
-# Named groups of exports
-%EXPORT_TAGS = (
- 'flock' => [qw(LOCK_SH LOCK_EX LOCK_NB LOCK_UN)],
- 'Fcompat' => [qw(FAPPEND FASYNC FCREAT FDEFER FDSYNC FEXCL FLARGEFILE
- FNDELAY FNONBLOCK FRSYNC FSYNC FTRUNC)],
- 'seek' => [qw(SEEK_SET SEEK_CUR SEEK_END)],
- 'mode' => [qw(S_ISUID S_ISGID S_ISVTX S_ISTXT
- _S_IFMT S_IFREG S_IFDIR S_IFLNK
- S_IFSOCK S_IFBLK S_IFCHR S_IFIFO S_IFWHT S_ENFMT
- S_IRUSR S_IWUSR S_IXUSR S_IRWXU
- S_IRGRP S_IWGRP S_IXGRP S_IRWXG
- S_IROTH S_IWOTH S_IXOTH S_IRWXO
- S_IREAD S_IWRITE S_IEXEC
- S_ISREG S_ISDIR S_ISLNK S_ISSOCK
- S_ISBLK S_ISCHR S_ISFIFO
- S_ISWHT S_ISENFMT
- S_IFMT S_IMODE
- )],
-);
-
-# Items to export into callers namespace by default
-# (move infrequently used names to @EXPORT_OK below)
-@EXPORT =
- qw(
- FD_CLOEXEC
- F_ALLOCSP
- F_ALLOCSP64
- F_COMPAT
- F_DUP2FD
- F_DUPFD
- F_EXLCK
- F_FREESP
- F_FREESP64
- F_FSYNC
- F_FSYNC64
- F_GETFD
- F_GETFL
- F_GETLK
- F_GETLK64
- F_GETOWN
- F_NODNY
- F_POSIX
- F_RDACC
- F_RDDNY
- F_RDLCK
- F_RWACC
- F_RWDNY
- F_SETFD
- F_SETFL
- F_SETLK
- F_SETLK64
- F_SETLKW
- F_SETLKW64
- F_SETOWN
- F_SHARE
- F_SHLCK
- F_UNLCK
- F_UNSHARE
- F_WRACC
- F_WRDNY
- F_WRLCK
- O_ACCMODE
- O_ALIAS
- O_APPEND
- O_ASYNC
- O_BINARY
- O_CREAT
- O_DEFER
- O_DIRECT
- O_DIRECTORY
- O_DSYNC
- O_EXCL
- O_EXLOCK
- O_LARGEFILE
- O_NDELAY
- O_NOCTTY
- O_NOFOLLOW
- O_NOINHERIT
- O_NONBLOCK
- O_RANDOM
- O_RAW
- O_RDONLY
- O_RDWR
- O_RSRC
- O_RSYNC
- O_SEQUENTIAL
- O_SHLOCK
- O_SYNC
- O_TEMPORARY
- O_TEXT
- O_TRUNC
- O_WRONLY
- );
-
-# Other items we are prepared to export if requested
-@EXPORT_OK = (qw(
- DN_ACCESS
- DN_ATTRIB
- DN_CREATE
- DN_DELETE
- DN_MODIFY
- DN_MULTISHOT
- DN_RENAME
- F_GETLEASE
- F_GETPIPE_SZ
- F_GETSIG
- F_NOTIFY
- F_SETLEASE
- F_SETPIPE_SZ
- F_SETSIG
- LOCK_MAND
- LOCK_READ
- LOCK_RW
- LOCK_WRITE
- O_ALT_IO
- O_EVTONLY
- O_IGNORE_CTTY
- O_NOATIME
- O_NOLINK
- O_NOSIGPIPE
- O_NOTRANS
- O_SYMLINK
- O_TTY_INIT
-), map {@{$_}} values %EXPORT_TAGS);
-
-1;
diff --git a/vendor/LeOS/tools-leos/common/perl-base/File/Basename.pm b/vendor/LeOS/tools-leos/common/perl-base/File/Basename.pm
deleted file mode 100644
index 06e9f3a7..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/File/Basename.pm
+++ /dev/null
@@ -1,210 +0,0 @@
-package File::Basename;
-
-# File::Basename is used during the Perl build, when the re extension may
-# not be available, but we only actually need it if running under tainting.
-BEGIN {
- if (${^TAINT}) {
- require re;
- re->import('taint');
- }
-}
-
-use strict;
-use 5.006;
-use warnings;
-our(@ISA, @EXPORT, $VERSION, $Fileparse_fstype, $Fileparse_igncase);
-require Exporter;
-@ISA = qw(Exporter);
-@EXPORT = qw(fileparse fileparse_set_fstype basename dirname);
-$VERSION = "2.85";
-
-fileparse_set_fstype($^O);
-
-sub fileparse {
- my($fullname,@suffices) = @_;
-
- unless (defined $fullname) {
- require Carp;
- Carp::croak("fileparse(): need a valid pathname");
- }
-
- my $orig_type = '';
- my($type,$igncase) = ($Fileparse_fstype, $Fileparse_igncase);
-
- my($taint) = substr($fullname,0,0); # Is $fullname tainted?
-
- if ($type eq "VMS" and $fullname =~ m{/} ) {
- # We're doing Unix emulation
- $orig_type = $type;
- $type = 'Unix';
- }
-
- my($dirpath, $basename);
-
- if (grep { $type eq $_ } qw(MSDOS DOS MSWin32 Epoc)) {
- ($dirpath,$basename) = ($fullname =~ /^((?:.*[:\\\/])?)(.*)/s);
- $dirpath .= '.\\' unless $dirpath =~ /[\\\/]\z/;
- }
- elsif ($type eq "OS2") {
- ($dirpath,$basename) = ($fullname =~ m#^((?:.*[:\\/])?)(.*)#s);
- $dirpath = './' unless $dirpath; # Can't be 0
- $dirpath .= '/' unless $dirpath =~ m#[\\/]\z#;
- }
- elsif ($type eq "MacOS") {
- ($dirpath,$basename) = ($fullname =~ /^(.*:)?(.*)/s);
- $dirpath = ':' unless $dirpath;
- }
- elsif ($type eq "AmigaOS") {
- ($dirpath,$basename) = ($fullname =~ /(.*[:\/])?(.*)/s);
- $dirpath = './' unless $dirpath;
- }
- elsif ($type eq 'VMS' ) {
- ($dirpath,$basename) = ($fullname =~ /^(.*[:>\]])?(.*)/s);
- $dirpath ||= ''; # should always be defined
- }
- else { # Default to Unix semantics.
- ($dirpath,$basename) = ($fullname =~ m{^(.*/)?(.*)}s);
- if ($orig_type eq 'VMS' and $fullname =~ m{^(/[^/]+/000000(/|$))(.*)}) {
- # dev:[000000] is top of VMS tree, similar to Unix '/'
- # so strip it off and treat the rest as "normal"
- my $devspec = $1;
- my $remainder = $3;
- ($dirpath,$basename) = ($remainder =~ m{^(.*/)?(.*)}s);
- $dirpath ||= ''; # should always be defined
- $dirpath = $devspec.$dirpath;
- }
- $dirpath = './' unless $dirpath;
- }
-
-
- my $tail = '';
- my $suffix = '';
- if (@suffices) {
- foreach $suffix (@suffices) {
- my $pat = ($igncase ? '(?i)' : '') . "($suffix)\$";
- if ($basename =~ s/$pat//s) {
- $taint .= substr($suffix,0,0);
- $tail = $1 . $tail;
- }
- }
- }
-
- # Ensure taint is propagated from the path to its pieces.
- $tail .= $taint;
- wantarray ? ($basename .= $taint, $dirpath .= $taint, $tail)
- : ($basename .= $taint);
-}
-
-sub basename {
- my($path) = shift;
-
- # From BSD basename(1)
- # The basename utility deletes any prefix ending with the last slash '/'
- # character present in string (after first stripping trailing slashes)
- _strip_trailing_sep($path);
-
- my($basename, $dirname, $suffix) = fileparse( $path, map("\Q$_\E",@_) );
-
- # From BSD basename(1)
- # The suffix is not stripped if it is identical to the remaining
- # characters in string.
- if( length $suffix and !length $basename ) {
- $basename = $suffix;
- }
-
- # Ensure that basename '/' == '/'
- if( !length $basename ) {
- $basename = $dirname;
- }
-
- return $basename;
-}
-
-sub dirname {
- my $path = shift;
-
- my($type) = $Fileparse_fstype;
-
- if( $type eq 'VMS' and $path =~ m{/} ) {
- # Parse as Unix
- local($File::Basename::Fileparse_fstype) = '';
- return dirname($path);
- }
-
- my($basename, $dirname) = fileparse($path);
-
- if ($type eq 'VMS') {
- $dirname ||= $ENV{DEFAULT};
- }
- elsif ($type eq 'MacOS') {
- if( !length($basename) && $dirname !~ /^[^:]+:\z/) {
- _strip_trailing_sep($dirname);
- ($basename,$dirname) = fileparse $dirname;
- }
- $dirname .= ":" unless $dirname =~ /:\z/;
- }
- elsif (grep { $type eq $_ } qw(MSDOS DOS MSWin32 OS2)) {
- _strip_trailing_sep($dirname);
- unless( length($basename) ) {
- ($basename,$dirname) = fileparse $dirname;
- _strip_trailing_sep($dirname);
- }
- }
- elsif ($type eq 'AmigaOS') {
- if ( $dirname =~ /:\z/) { return $dirname }
- chop $dirname;
- $dirname =~ s{[^:/]+\z}{} unless length($basename);
- }
- else {
- _strip_trailing_sep($dirname);
- unless( length($basename) ) {
- ($basename,$dirname) = fileparse $dirname;
- _strip_trailing_sep($dirname);
- }
- }
-
- $dirname;
-}
-
-# Strip the trailing path separator.
-sub _strip_trailing_sep {
- my $type = $Fileparse_fstype;
-
- if ($type eq 'MacOS') {
- $_[0] =~ s/([^:]):\z/$1/s;
- }
- elsif (grep { $type eq $_ } qw(MSDOS DOS MSWin32 OS2)) {
- $_[0] =~ s/([^:])[\\\/]*\z/$1/;
- }
- else {
- $_[0] =~ s{(.)/*\z}{$1}s;
- }
-}
-
-BEGIN {
-
-my @Ignore_Case = qw(MacOS VMS AmigaOS OS2 RISCOS MSWin32 MSDOS DOS Epoc);
-my @Types = (@Ignore_Case, qw(Unix));
-
-sub fileparse_set_fstype {
- my $old = $Fileparse_fstype;
-
- if (@_) {
- my $new_type = shift;
-
- $Fileparse_fstype = 'Unix'; # default
- foreach my $type (@Types) {
- $Fileparse_fstype = $type if $new_type =~ /^$type/i;
- }
-
- $Fileparse_igncase =
- (grep $Fileparse_fstype eq $_, @Ignore_Case) ? 1 : 0;
- }
-
- return $old;
-}
-
-}
-
-1;
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/File/Glob.pm b/vendor/LeOS/tools-leos/common/perl-base/File/Glob.pm
deleted file mode 100644
index 16b6e76e..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/File/Glob.pm
+++ /dev/null
@@ -1,90 +0,0 @@
-package File::Glob;
-
-use strict;
-our($VERSION, @ISA, @EXPORT_OK, @EXPORT_FAIL, %EXPORT_TAGS, $DEFAULT_FLAGS);
-
-require XSLoader;
-
-@ISA = qw(Exporter);
-
-# NOTE: The glob() export is only here for compatibility with 5.6.0.
-# csh_glob() should not be used directly, unless you know what you're doing.
-
-%EXPORT_TAGS = (
- 'glob' => [ qw(
- GLOB_ABEND
- GLOB_ALPHASORT
- GLOB_ALTDIRFUNC
- GLOB_BRACE
- GLOB_CSH
- GLOB_ERR
- GLOB_ERROR
- GLOB_LIMIT
- GLOB_MARK
- GLOB_NOCASE
- GLOB_NOCHECK
- GLOB_NOMAGIC
- GLOB_NOSORT
- GLOB_NOSPACE
- GLOB_QUOTE
- GLOB_TILDE
- bsd_glob
- glob
- ) ],
-);
-$EXPORT_TAGS{bsd_glob} = [@{$EXPORT_TAGS{glob}}];
-pop @{$EXPORT_TAGS{bsd_glob}}; # no "glob"
-
-@EXPORT_OK = (@{$EXPORT_TAGS{'glob'}}, 'csh_glob');
-
-$VERSION = '1.28';
-
-sub import {
- require Exporter;
- local $Exporter::ExportLevel = $Exporter::ExportLevel + 1;
- Exporter::import(grep {
- my $passthrough;
- if ($_ eq ':case') {
- $DEFAULT_FLAGS &= ~GLOB_NOCASE()
- }
- elsif ($_ eq ':nocase') {
- $DEFAULT_FLAGS |= GLOB_NOCASE();
- }
- elsif ($_ eq ':globally') {
- no warnings 'redefine';
- *CORE::GLOBAL::glob = \&File::Glob::csh_glob;
- }
- elsif ($_ eq ':bsd_glob') {
- no strict; *{caller."::glob"} = \&bsd_glob_override;
- $passthrough = 1;
- }
- else {
- $passthrough = 1;
- }
- $passthrough;
- } @_);
-}
-
-XSLoader::load();
-
-$DEFAULT_FLAGS = GLOB_CSH();
-if ($^O =~ /^(?:MSWin32|VMS|os2|dos|riscos)$/) {
- $DEFAULT_FLAGS |= GLOB_NOCASE();
-}
-
-# File::Glob::glob() is deprecated because its prototype is different from
-# CORE::glob() (use bsd_glob() instead)
-sub glob {
- use 5.024;
- use warnings ();
- warnings::warnif (deprecated =>
- "File::Glob::glob() will disappear in perl 5.30. " .
- "Use File::Glob::bsd_glob() instead.") unless state $warned ++;
-
- splice @_, 1; # no flags
- goto &bsd_glob;
-}
-
-1;
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/File/Path.pm b/vendor/LeOS/tools-leos/common/perl-base/File/Path.pm
deleted file mode 100644
index b9a4fb38..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/File/Path.pm
+++ /dev/null
@@ -1,583 +0,0 @@
-package File::Path;
-
-use 5.005_04;
-use strict;
-
-use Cwd 'getcwd';
-use File::Basename ();
-use File::Spec ();
-
-BEGIN {
- if ( $] < 5.006 ) {
-
- # can't say 'opendir my $dh, $dirname'
- # need to initialise $dh
- eval 'use Symbol';
- }
-}
-
-use Exporter ();
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = '2.12_01';
-$VERSION = eval $VERSION;
-@ISA = qw(Exporter);
-@EXPORT = qw(mkpath rmtree);
-@EXPORT_OK = qw(make_path remove_tree);
-
-BEGIN {
- for (qw(VMS MacOS MSWin32 os2)) {
- no strict 'refs';
- *{"_IS_\U$_"} = $^O eq $_ ? sub () { 1 } : sub () { 0 };
- }
-
- # These OSes complain if you want to remove a file that you have no
- # write permission to:
- *_FORCE_WRITABLE = (
- grep { $^O eq $_ } qw(amigaos dos epoc MSWin32 MacOS os2)
- ) ? sub () { 1 } : sub () { 0 };
-
- # Unix-like systems need to stat each directory in order to detect
- # race condition. MS-Windows is immune to this particular attack.
- *_NEED_STAT_CHECK = !(_IS_MSWIN32()) ? sub () { 1 } : sub () { 0 };
-}
-
-sub _carp {
- require Carp;
- goto &Carp::carp;
-}
-
-sub _croak {
- require Carp;
- goto &Carp::croak;
-}
-
-sub _error {
- my $arg = shift;
- my $message = shift;
- my $object = shift;
-
- if ( $arg->{error} ) {
- $object = '' unless defined $object;
- $message .= ": $!" if $!;
- push @{ ${ $arg->{error} } }, { $object => $message };
- }
- else {
- _carp( defined($object) ? "$message for $object: $!" : "$message: $!" );
- }
-}
-
-sub __is_arg {
- my ($arg) = @_;
-
- # If client code blessed an array ref to HASH, this will not work
- # properly. We could have done $arg->isa() wrapped in eval, but
- # that would be expensive. This implementation should suffice.
- # We could have also used Scalar::Util:blessed, but we choose not
- # to add this dependency
- return ( ref $arg eq 'HASH' );
-}
-
-sub make_path {
- push @_, {} unless @_ and __is_arg( $_[-1] );
- goto &mkpath;
-}
-
-sub mkpath {
- my $old_style = !( @_ and __is_arg( $_[-1] ) );
-
- my $arg;
- my $paths;
-
- if ($old_style) {
- my ( $verbose, $mode );
- ( $paths, $verbose, $mode ) = @_;
- $paths = [$paths] unless UNIVERSAL::isa( $paths, 'ARRAY' );
- $arg->{verbose} = $verbose;
- $arg->{mode} = defined $mode ? $mode : oct '777';
- }
- else {
- my %args_permitted = map { $_ => 1 } ( qw|
- chmod
- error
- group
- mask
- mode
- owner
- uid
- user
- verbose
- | );
- my @bad_args = ();
- $arg = pop @_;
- for my $k (sort keys %{$arg}) {
- push @bad_args, $k unless $args_permitted{$k};
- }
- _carp("Unrecognized option(s) passed to make_path(): @bad_args")
- if @bad_args;
- $arg->{mode} = delete $arg->{mask} if exists $arg->{mask};
- $arg->{mode} = oct '777' unless exists $arg->{mode};
- ${ $arg->{error} } = [] if exists $arg->{error};
- $arg->{owner} = delete $arg->{user} if exists $arg->{user};
- $arg->{owner} = delete $arg->{uid} if exists $arg->{uid};
- if ( exists $arg->{owner} and $arg->{owner} =~ /\D/ ) {
- my $uid = ( getpwnam $arg->{owner} )[2];
- if ( defined $uid ) {
- $arg->{owner} = $uid;
- }
- else {
- _error( $arg,
-"unable to map $arg->{owner} to a uid, ownership not changed"
- );
- delete $arg->{owner};
- }
- }
- if ( exists $arg->{group} and $arg->{group} =~ /\D/ ) {
- my $gid = ( getgrnam $arg->{group} )[2];
- if ( defined $gid ) {
- $arg->{group} = $gid;
- }
- else {
- _error( $arg,
-"unable to map $arg->{group} to a gid, group ownership not changed"
- );
- delete $arg->{group};
- }
- }
- if ( exists $arg->{owner} and not exists $arg->{group} ) {
- $arg->{group} = -1; # chown will leave group unchanged
- }
- if ( exists $arg->{group} and not exists $arg->{owner} ) {
- $arg->{owner} = -1; # chown will leave owner unchanged
- }
- $paths = [@_];
- }
- return _mkpath( $arg, $paths );
-}
-
-sub _mkpath {
- my $arg = shift;
- my $paths = shift;
-
- my ( @created );
- foreach my $path ( @{$paths} ) {
- next unless defined($path) and length($path);
- $path .= '/' if _IS_OS2 and $path =~ /^\w:\z/s; # feature of CRT
-
- # Logic wants Unix paths, so go with the flow.
- if (_IS_VMS) {
- next if $path eq '/';
- $path = VMS::Filespec::unixify($path);
- }
- next if -d $path;
- my $parent = File::Basename::dirname($path);
- unless ( -d $parent or $path eq $parent ) {
- push( @created, _mkpath( $arg, [$parent] ) );
- }
- print "mkdir $path\n" if $arg->{verbose};
- if ( mkdir( $path, $arg->{mode} ) ) {
- push( @created, $path );
- if ( exists $arg->{owner} ) {
-
- # NB: $arg->{group} guaranteed to be set during initialisation
- if ( !chown $arg->{owner}, $arg->{group}, $path ) {
- _error( $arg,
-"Cannot change ownership of $path to $arg->{owner}:$arg->{group}"
- );
- }
- }
- if ( exists $arg->{chmod} ) {
- if ( !chmod $arg->{chmod}, $path ) {
- _error( $arg,
- "Cannot change permissions of $path to $arg->{chmod}" );
- }
- }
- }
- else {
- my $save_bang = $!;
- my ( $e, $e1 ) = ( $save_bang, $^E );
- $e .= "; $e1" if $e ne $e1;
-
- # allow for another process to have created it meanwhile
- if ( ! -d $path ) {
- $! = $save_bang;
- if ( $arg->{error} ) {
- push @{ ${ $arg->{error} } }, { $path => $e };
- }
- else {
- _croak("mkdir $path: $e");
- }
- }
- }
- }
- return @created;
-}
-
-sub remove_tree {
- push @_, {} unless @_ and __is_arg( $_[-1] );
- goto &rmtree;
-}
-
-sub _is_subdir {
- my ( $dir, $test ) = @_;
-
- my ( $dv, $dd ) = File::Spec->splitpath( $dir, 1 );
- my ( $tv, $td ) = File::Spec->splitpath( $test, 1 );
-
- # not on same volume
- return 0 if $dv ne $tv;
-
- my @d = File::Spec->splitdir($dd);
- my @t = File::Spec->splitdir($td);
-
- # @t can't be a subdir if it's shorter than @d
- return 0 if @t < @d;
-
- return join( '/', @d ) eq join( '/', splice @t, 0, +@d );
-}
-
-sub rmtree {
- my $old_style = !( @_ and __is_arg( $_[-1] ) );
-
- my $arg;
- my $paths;
-
- if ($old_style) {
- my ( $verbose, $safe );
- ( $paths, $verbose, $safe ) = @_;
- $arg->{verbose} = $verbose;
- $arg->{safe} = defined $safe ? $safe : 0;
-
- if ( defined($paths) and length($paths) ) {
- $paths = [$paths] unless UNIVERSAL::isa( $paths, 'ARRAY' );
- }
- else {
- _carp("No root path(s) specified\n");
- return 0;
- }
- }
- else {
- my %args_permitted = map { $_ => 1 } ( qw|
- error
- keep_root
- result
- safe
- verbose
- | );
- my @bad_args = ();
- $arg = pop @_;
- for my $k (sort keys %{$arg}) {
- push @bad_args, $k unless $args_permitted{$k};
- }
- _carp("Unrecognized option(s) passed to remove_tree(): @bad_args")
- if @bad_args;
- ${ $arg->{error} } = [] if exists $arg->{error};
- ${ $arg->{result} } = [] if exists $arg->{result};
- $paths = [@_];
- }
-
- $arg->{prefix} = '';
- $arg->{depth} = 0;
-
- my @clean_path;
- $arg->{cwd} = getcwd() or do {
- _error( $arg, "cannot fetch initial working directory" );
- return 0;
- };
- for ( $arg->{cwd} ) { /\A(.*)\Z/s; $_ = $1 } # untaint
-
- for my $p (@$paths) {
-
- # need to fixup case and map \ to / on Windows
- my $ortho_root = _IS_MSWIN32 ? _slash_lc($p) : $p;
- my $ortho_cwd =
- _IS_MSWIN32 ? _slash_lc( $arg->{cwd} ) : $arg->{cwd};
- my $ortho_root_length = length($ortho_root);
- $ortho_root_length-- if _IS_VMS; # don't compare '.' with ']'
- if ( $ortho_root_length && _is_subdir( $ortho_root, $ortho_cwd ) ) {
- local $! = 0;
- _error( $arg, "cannot remove path when cwd is $arg->{cwd}", $p );
- next;
- }
-
- if (_IS_MACOS) {
- $p = ":$p" unless $p =~ /:/;
- $p .= ":" unless $p =~ /:\z/;
- }
- elsif ( _IS_MSWIN32 ) {
- $p =~ s{[/\\]\z}{};
- }
- else {
- $p =~ s{/\z}{};
- }
- push @clean_path, $p;
- }
-
- @{$arg}{qw(device inode perm)} = ( lstat $arg->{cwd} )[ 0, 1 ] or do {
- _error( $arg, "cannot stat initial working directory", $arg->{cwd} );
- return 0;
- };
-
- return _rmtree( $arg, \@clean_path );
-}
-
-sub _rmtree {
- my $arg = shift;
- my $paths = shift;
-
- my $count = 0;
- my $curdir = File::Spec->curdir();
- my $updir = File::Spec->updir();
-
- my ( @files, $root );
- ROOT_DIR:
- foreach my $root (@$paths) {
-
- # since we chdir into each directory, it may not be obvious
- # to figure out where we are if we generate a message about
- # a file name. We therefore construct a semi-canonical
- # filename, anchored from the directory being unlinked (as
- # opposed to being truly canonical, anchored from the root (/).
-
- my $canon =
- $arg->{prefix}
- ? File::Spec->catfile( $arg->{prefix}, $root )
- : $root;
-
- my ( $ldev, $lino, $perm ) = ( lstat $root )[ 0, 1, 2 ]
- or next ROOT_DIR;
-
- if ( -d _ ) {
- $root = VMS::Filespec::vmspath( VMS::Filespec::pathify($root) )
- if _IS_VMS;
-
- if ( !chdir($root) ) {
-
- # see if we can escalate privileges to get in
- # (e.g. funny protection mask such as -w- instead of rwx)
- # This uses fchmod to avoid traversing outside of the proper
- # location (CVE-2017-6512)
- my $root_fh;
- if (open($root_fh, '<', $root)) {
- my ($fh_dev, $fh_inode) = (stat $root_fh )[0,1];
- $perm &= oct '7777';
- my $nperm = $perm | oct '700';
- local $@;
- if (
- !(
- $arg->{safe}
- or $nperm == $perm
- or !-d _
- or $fh_dev ne $ldev
- or $fh_inode ne $lino
- or eval { chmod( $nperm, $root_fh ) }
- )
- )
- {
- _error( $arg,
- "cannot make child directory read-write-exec", $canon );
- next ROOT_DIR;
- }
- close $root_fh;
- }
- if ( !chdir($root) ) {
- _error( $arg, "cannot chdir to child", $canon );
- next ROOT_DIR;
- }
- }
-
- my ( $cur_dev, $cur_inode, $perm ) = ( stat $curdir )[ 0, 1, 2 ]
- or do {
- _error( $arg, "cannot stat current working directory", $canon );
- next ROOT_DIR;
- };
-
- if (_NEED_STAT_CHECK) {
- ( $ldev eq $cur_dev and $lino eq $cur_inode )
- or _croak(
-"directory $canon changed before chdir, expected dev=$ldev ino=$lino, actual dev=$cur_dev ino=$cur_inode, aborting."
- );
- }
-
- $perm &= oct '7777'; # don't forget setuid, setgid, sticky bits
- my $nperm = $perm | oct '700';
-
- # notabene: 0700 is for making readable in the first place,
- # it's also intended to change it to writable in case we have
- # to recurse in which case we are better than rm -rf for
- # subtrees with strange permissions
-
- if (
- !(
- $arg->{safe}
- or $nperm == $perm
- or chmod( $nperm, $curdir )
- )
- )
- {
- _error( $arg, "cannot make directory read+writeable", $canon );
- $nperm = $perm;
- }
-
- my $d;
- $d = gensym() if $] < 5.006;
- if ( !opendir $d, $curdir ) {
- _error( $arg, "cannot opendir", $canon );
- @files = ();
- }
- else {
- if ( !defined ${^TAINT} or ${^TAINT} ) {
- # Blindly untaint dir names if taint mode is active
- @files = map { /\A(.*)\z/s; $1 } readdir $d;
- }
- else {
- @files = readdir $d;
- }
- closedir $d;
- }
-
- if (_IS_VMS) {
-
- # Deleting large numbers of files from VMS Files-11
- # filesystems is faster if done in reverse ASCIIbetical order.
- # include '.' to '.;' from blead patch #31775
- @files = map { $_ eq '.' ? '.;' : $_ } reverse @files;
- }
-
- @files = grep { $_ ne $updir and $_ ne $curdir } @files;
-
- if (@files) {
-
- # remove the contained files before the directory itself
- my $narg = {%$arg};
- @{$narg}{qw(device inode cwd prefix depth)} =
- ( $cur_dev, $cur_inode, $updir, $canon, $arg->{depth} + 1 );
- $count += _rmtree( $narg, \@files );
- }
-
- # restore directory permissions of required now (in case the rmdir
- # below fails), while we are still in the directory and may do so
- # without a race via '.'
- if ( $nperm != $perm and not chmod( $perm, $curdir ) ) {
- _error( $arg, "cannot reset chmod", $canon );
- }
-
- # don't leave the client code in an unexpected directory
- chdir( $arg->{cwd} )
- or
- _croak("cannot chdir to $arg->{cwd} from $canon: $!, aborting.");
-
- # ensure that a chdir upwards didn't take us somewhere other
- # than we expected (see CVE-2002-0435)
- ( $cur_dev, $cur_inode ) = ( stat $curdir )[ 0, 1 ]
- or _croak(
- "cannot stat prior working directory $arg->{cwd}: $!, aborting."
- );
-
- if (_NEED_STAT_CHECK) {
- ( $arg->{device} eq $cur_dev and $arg->{inode} eq $cur_inode )
- or _croak( "previous directory $arg->{cwd} "
- . "changed before entering $canon, "
- . "expected dev=$ldev ino=$lino, "
- . "actual dev=$cur_dev ino=$cur_inode, aborting."
- );
- }
-
- if ( $arg->{depth} or !$arg->{keep_root} ) {
- if ( $arg->{safe}
- && ( _IS_VMS
- ? !&VMS::Filespec::candelete($root)
- : !-w $root ) )
- {
- print "skipped $root\n" if $arg->{verbose};
- next ROOT_DIR;
- }
- if ( _FORCE_WRITABLE and !chmod $perm | oct '700', $root ) {
- _error( $arg, "cannot make directory writeable", $canon );
- }
- print "rmdir $root\n" if $arg->{verbose};
- if ( rmdir $root ) {
- push @{ ${ $arg->{result} } }, $root if $arg->{result};
- ++$count;
- }
- else {
- _error( $arg, "cannot remove directory", $canon );
- if (
- _FORCE_WRITABLE
- && !chmod( $perm,
- ( _IS_VMS ? VMS::Filespec::fileify($root) : $root )
- )
- )
- {
- _error(
- $arg,
- sprintf( "cannot restore permissions to 0%o",
- $perm ),
- $canon
- );
- }
- }
- }
- }
- else {
- # not a directory
- $root = VMS::Filespec::vmsify("./$root")
- if _IS_VMS
- && !File::Spec->file_name_is_absolute($root)
- && ( $root !~ m/(?]+/ ); # not already in VMS syntax
-
- if (
- $arg->{safe}
- && (
- _IS_VMS
- ? !&VMS::Filespec::candelete($root)
- : !( -l $root || -w $root )
- )
- )
- {
- print "skipped $root\n" if $arg->{verbose};
- next ROOT_DIR;
- }
-
- my $nperm = $perm & oct '7777' | oct '600';
- if ( _FORCE_WRITABLE
- and $nperm != $perm
- and not chmod $nperm, $root )
- {
- _error( $arg, "cannot make file writeable", $canon );
- }
- print "unlink $canon\n" if $arg->{verbose};
-
- # delete all versions under VMS
- for ( ; ; ) {
- if ( unlink $root ) {
- push @{ ${ $arg->{result} } }, $root if $arg->{result};
- }
- else {
- _error( $arg, "cannot unlink file", $canon );
- _FORCE_WRITABLE and chmod( $perm, $root )
- or _error( $arg,
- sprintf( "cannot restore permissions to 0%o", $perm ),
- $canon );
- last;
- }
- ++$count;
- last unless _IS_VMS && lstat $root;
- }
- }
- }
- return $count;
-}
-
-sub _slash_lc {
-
- # fix up slashes and case on MSWin32 so that we can determine that
- # c:\path\to\dir is underneath C:/Path/To
- my $path = shift;
- $path =~ tr{\\}{/};
- return lc($path);
-}
-
-1;
-
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/File/Spec.pm b/vendor/LeOS/tools-leos/common/perl-base/File/Spec.pm
deleted file mode 100644
index b9138d68..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/File/Spec.pm
+++ /dev/null
@@ -1,28 +0,0 @@
-package File::Spec;
-
-use strict;
-use vars qw(@ISA $VERSION);
-
-$VERSION = '3.67';
-$VERSION =~ tr/_//d;
-
-my %module = (MacOS => 'Mac',
- MSWin32 => 'Win32',
- os2 => 'OS2',
- VMS => 'VMS',
- epoc => 'Epoc',
- NetWare => 'Win32', # Yes, File::Spec::Win32 works on NetWare.
- symbian => 'Win32', # Yes, File::Spec::Win32 works on symbian.
- dos => 'OS2', # Yes, File::Spec::OS2 works on DJGPP.
- cygwin => 'Cygwin',
- amigaos => 'AmigaOS');
-
-my $module = $module{$^O} || 'Unix';
-
-require "File/Spec/$module.pm";
-@ISA = ("File::Spec::$module");
-
-1;
-
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/File/Spec/Unix.pm b/vendor/LeOS/tools-leos/common/perl-base/File/Spec/Unix.pm
deleted file mode 100644
index 3d5a619c..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/File/Spec/Unix.pm
+++ /dev/null
@@ -1,341 +0,0 @@
-package File::Spec::Unix;
-
-use strict;
-use vars qw($VERSION);
-
-$VERSION = '3.67';
-my $xs_version = $VERSION;
-$VERSION =~ tr/_//d;
-
-#dont try to load XSLoader and DynaLoader only to ultimately fail on miniperl
-if(!defined &canonpath && defined &DynaLoader::boot_DynaLoader) {
- eval {#eval is questionable since we are handling potential errors like
- #"Cwd object version 3.48 does not match bootstrap parameter 3.50
- #at lib/DynaLoader.pm line 216." by having this eval
- if ( $] >= 5.006 ) {
- require XSLoader;
- XSLoader::load("Cwd", $xs_version);
- } else {
- require Cwd;
- }
- };
-}
-
-sub _pp_canonpath {
- my ($self,$path) = @_;
- return unless defined $path;
-
- # Handle POSIX-style node names beginning with double slash (qnx, nto)
- # (POSIX says: "a pathname that begins with two successive slashes
- # may be interpreted in an implementation-defined manner, although
- # more than two leading slashes shall be treated as a single slash.")
- my $node = '';
- my $double_slashes_special = $^O eq 'qnx' || $^O eq 'nto';
-
- if ( $double_slashes_special
- && ( $path =~ s{^(//[^/]+)/?\z}{}s || $path =~ s{^(//[^/]+)/}{/}s ) ) {
- $node = $1;
- }
- # This used to be
- # $path =~ s|/+|/|g unless ($^O eq 'cygwin');
- # but that made tests 29, 30, 35, 46, and 213 (as of #13272) to fail
- # (Mainly because trailing "" directories didn't get stripped).
- # Why would cygwin avoid collapsing multiple slashes into one? --jhi
- $path =~ s|/{2,}|/|g; # xx////xx -> xx/xx
- $path =~ s{(?:/\.)+(?:/|\z)}{/}g; # xx/././xx -> xx/xx
- $path =~ s|^(?:\./)+||s unless $path eq "./"; # ./xx -> xx
- $path =~ s|^/(?:\.\./)+|/|; # /../../xx -> xx
- $path =~ s|^/\.\.$|/|; # /.. -> /
- $path =~ s|/\z|| unless $path eq "/"; # xx/ -> xx
- return "$node$path";
-}
-*canonpath = \&_pp_canonpath unless defined &canonpath;
-
-sub _pp_catdir {
- my $self = shift;
-
- $self->canonpath(join('/', @_, '')); # '' because need a trailing '/'
-}
-*catdir = \&_pp_catdir unless defined &catdir;
-
-sub _pp_catfile {
- my $self = shift;
- my $file = $self->canonpath(pop @_);
- return $file unless @_;
- my $dir = $self->catdir(@_);
- $dir .= "/" unless substr($dir,-1) eq "/";
- return $dir.$file;
-}
-*catfile = \&_pp_catfile unless defined &catfile;
-
-sub curdir { '.' }
-use constant _fn_curdir => ".";
-
-sub devnull { '/dev/null' }
-use constant _fn_devnull => "/dev/null";
-
-sub rootdir { '/' }
-use constant _fn_rootdir => "/";
-
-my ($tmpdir, %tmpenv);
-# Cache and return the calculated tmpdir, recording which env vars
-# determined it.
-sub _cache_tmpdir {
- @tmpenv{@_[2..$#_]} = @ENV{@_[2..$#_]};
- return $tmpdir = $_[1];
-}
-# Retrieve the cached tmpdir, checking first whether relevant env vars have
-# changed and invalidated the cache.
-sub _cached_tmpdir {
- shift;
- local $^W;
- return if grep $ENV{$_} ne $tmpenv{$_}, @_;
- return $tmpdir;
-}
-sub _tmpdir {
- my $self = shift;
- my @dirlist = @_;
- my $taint = do { no strict 'refs'; ${"\cTAINT"} };
- if ($taint) { # Check for taint mode on perl >= 5.8.0
- require Scalar::Util;
- @dirlist = grep { ! Scalar::Util::tainted($_) } @dirlist;
- }
- elsif ($] < 5.007) { # No ${^TAINT} before 5.8
- @dirlist = grep { eval { eval('1'.substr $_,0,0) } } @dirlist;
- }
-
- foreach (@dirlist) {
- next unless defined && -d && -w _;
- $tmpdir = $_;
- last;
- }
- $tmpdir = $self->curdir unless defined $tmpdir;
- $tmpdir = defined $tmpdir && $self->canonpath($tmpdir);
- if ( !$self->file_name_is_absolute($tmpdir) ) {
- # See [perl #120593] for the full details
- # If possible, return a full path, rather than '.' or 'lib', but
- # jump through some hoops to avoid returning a tainted value.
- ($tmpdir) = grep {
- $taint ? ! Scalar::Util::tainted($_) :
- $] < 5.007 ? eval { eval('1'.substr $_,0,0) } : 1
- } $self->rel2abs($tmpdir), $tmpdir;
- }
- return $tmpdir;
-}
-
-sub tmpdir {
- my $cached = $_[0]->_cached_tmpdir('TMPDIR');
- return $cached if defined $cached;
- $_[0]->_cache_tmpdir($_[0]->_tmpdir( $ENV{TMPDIR}, "/tmp" ), 'TMPDIR');
-}
-
-sub updir { '..' }
-use constant _fn_updir => "..";
-
-sub no_upwards {
- my $self = shift;
- return grep(!/^\.{1,2}\z/s, @_);
-}
-
-sub case_tolerant { 0 }
-use constant _fn_case_tolerant => 0;
-
-sub file_name_is_absolute {
- my ($self,$file) = @_;
- return scalar($file =~ m:^/:s);
-}
-
-sub path {
- return () unless exists $ENV{PATH};
- my @path = split(':', $ENV{PATH});
- foreach (@path) { $_ = '.' if $_ eq '' }
- return @path;
-}
-
-sub join {
- my $self = shift;
- return $self->catfile(@_);
-}
-
-sub splitpath {
- my ($self,$path, $nofile) = @_;
-
- my ($volume,$directory,$file) = ('','','');
-
- if ( $nofile ) {
- $directory = $path;
- }
- else {
- $path =~ m|^ ( (?: .* / (?: \.\.?\z )? )? ) ([^/]*) |xs;
- $directory = $1;
- $file = $2;
- }
-
- return ($volume,$directory,$file);
-}
-
-sub splitdir {
- return split m|/|, $_[1], -1; # Preserve trailing fields
-}
-
-sub catpath {
- my ($self,$volume,$directory,$file) = @_;
-
- if ( $directory ne '' &&
- $file ne '' &&
- substr( $directory, -1 ) ne '/' &&
- substr( $file, 0, 1 ) ne '/'
- ) {
- $directory .= "/$file" ;
- }
- else {
- $directory .= $file ;
- }
-
- return $directory ;
-}
-
-sub abs2rel {
- my($self,$path,$base) = @_;
- $base = $self->_cwd() unless defined $base and length $base;
-
- ($path, $base) = map $self->canonpath($_), $path, $base;
-
- my $path_directories;
- my $base_directories;
-
- if (grep $self->file_name_is_absolute($_), $path, $base) {
- ($path, $base) = map $self->rel2abs($_), $path, $base;
-
- my ($path_volume) = $self->splitpath($path, 1);
- my ($base_volume) = $self->splitpath($base, 1);
-
- # Can't relativize across volumes
- return $path unless $path_volume eq $base_volume;
-
- $path_directories = ($self->splitpath($path, 1))[1];
- $base_directories = ($self->splitpath($base, 1))[1];
-
- # For UNC paths, the user might give a volume like //foo/bar that
- # strictly speaking has no directory portion. Treat it as if it
- # had the root directory for that volume.
- if (!length($base_directories) and $self->file_name_is_absolute($base)) {
- $base_directories = $self->rootdir;
- }
- }
- else {
- my $wd= ($self->splitpath($self->_cwd(), 1))[1];
- $path_directories = $self->catdir($wd, $path);
- $base_directories = $self->catdir($wd, $base);
- }
-
- # Now, remove all leading components that are the same
- my @pathchunks = $self->splitdir( $path_directories );
- my @basechunks = $self->splitdir( $base_directories );
-
- if ($base_directories eq $self->rootdir) {
- return $self->curdir if $path_directories eq $self->rootdir;
- shift @pathchunks;
- return $self->canonpath( $self->catpath('', $self->catdir( @pathchunks ), '') );
- }
-
- my @common;
- while (@pathchunks && @basechunks && $self->_same($pathchunks[0], $basechunks[0])) {
- push @common, shift @pathchunks ;
- shift @basechunks ;
- }
- return $self->curdir unless @pathchunks || @basechunks;
-
- # @basechunks now contains the directories the resulting relative path
- # must ascend out of before it can descend to $path_directory. If there
- # are updir components, we must descend into the corresponding directories
- # (this only works if they are no symlinks).
- my @reverse_base;
- while( defined(my $dir= shift @basechunks) ) {
- if( $dir ne $self->updir ) {
- unshift @reverse_base, $self->updir;
- push @common, $dir;
- }
- elsif( @common ) {
- if( @reverse_base && $reverse_base[0] eq $self->updir ) {
- shift @reverse_base;
- pop @common;
- }
- else {
- unshift @reverse_base, pop @common;
- }
- }
- }
- my $result_dirs = $self->catdir( @reverse_base, @pathchunks );
- return $self->canonpath( $self->catpath('', $result_dirs, '') );
-}
-
-sub _same {
- $_[1] eq $_[2];
-}
-
-sub rel2abs {
- my ($self,$path,$base ) = @_;
-
- # Clean up $path
- if ( ! $self->file_name_is_absolute( $path ) ) {
- # Figure out the effective $base and clean it up.
- if ( !defined( $base ) || $base eq '' ) {
- $base = $self->_cwd();
- }
- elsif ( ! $self->file_name_is_absolute( $base ) ) {
- $base = $self->rel2abs( $base ) ;
- }
- else {
- $base = $self->canonpath( $base ) ;
- }
-
- # Glom them together
- $path = $self->catdir( $base, $path ) ;
- }
-
- return $self->canonpath( $path ) ;
-}
-
-# Internal routine to File::Spec, no point in making this public since
-# it is the standard Cwd interface. Most of the platform-specific
-# File::Spec subclasses use this.
-sub _cwd {
- require Cwd;
- Cwd::getcwd();
-}
-
-# Internal method to reduce xx\..\yy -> yy
-sub _collapse {
- my($fs, $path) = @_;
-
- my $updir = $fs->updir;
- my $curdir = $fs->curdir;
-
- my($vol, $dirs, $file) = $fs->splitpath($path);
- my @dirs = $fs->splitdir($dirs);
- pop @dirs if @dirs && $dirs[-1] eq '';
-
- my @collapsed;
- foreach my $dir (@dirs) {
- if( $dir eq $updir and # if we have an updir
- @collapsed and # and something to collapse
- length $collapsed[-1] and # and its not the rootdir
- $collapsed[-1] ne $updir and # nor another updir
- $collapsed[-1] ne $curdir # nor the curdir
- )
- { # then
- pop @collapsed; # collapse
- }
- else { # else
- push @collapsed, $dir; # just hang onto it
- }
- }
-
- return $fs->catpath($vol,
- $fs->catdir(@collapsed),
- $file
- );
-}
-
-1;
diff --git a/vendor/LeOS/tools-leos/common/perl-base/File/Temp.pm b/vendor/LeOS/tools-leos/common/perl-base/File/Temp.pm
deleted file mode 100644
index 308d9ebb..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/File/Temp.pm
+++ /dev/null
@@ -1,1592 +0,0 @@
-package File::Temp;
-# ABSTRACT: return name and handle of a temporary file safely
-our $VERSION = '0.2304'; # VERSION
-
-# Toolchain targets v5.8.1, but we'll try to support back to v5.6 anyway.
-# It might be possible to make this v5.5, but many v5.6isms are creeping
-# into the code and tests.
-use 5.006;
-use strict;
-use Carp;
-use File::Spec 0.8;
-use Cwd ();
-use File::Path 2.06 qw/ rmtree /;
-use Fcntl 1.03;
-use IO::Seekable; # For SEEK_*
-use Errno;
-use Scalar::Util 'refaddr';
-require VMS::Stdio if $^O eq 'VMS';
-
-# pre-emptively load Carp::Heavy. If we don't when we run out of file
-# handles and attempt to call croak() we get an error message telling
-# us that Carp::Heavy won't load rather than an error telling us we
-# have run out of file handles. We either preload croak() or we
-# switch the calls to croak from _gettemp() to use die.
-eval { require Carp::Heavy; };
-
-# Need the Symbol package if we are running older perl
-require Symbol if $] < 5.006;
-
-### For the OO interface
-use parent 0.221 qw/ IO::Handle IO::Seekable /;
-use overload '""' => "STRINGIFY", '0+' => "NUMIFY",
- fallback => 1;
-
-# use 'our' on v5.6.0
-use vars qw(@EXPORT_OK %EXPORT_TAGS $DEBUG $KEEP_ALL);
-
-$DEBUG = 0;
-$KEEP_ALL = 0;
-
-# We are exporting functions
-
-use Exporter 5.57 'import'; # 5.57 lets us import 'import'
-
-# Export list - to allow fine tuning of export table
-
-@EXPORT_OK = qw{
- tempfile
- tempdir
- tmpnam
- tmpfile
- mktemp
- mkstemp
- mkstemps
- mkdtemp
- unlink0
- cleanup
- SEEK_SET
- SEEK_CUR
- SEEK_END
- };
-
-# Groups of functions for export
-
-%EXPORT_TAGS = (
- 'POSIX' => [qw/ tmpnam tmpfile /],
- 'mktemp' => [qw/ mktemp mkstemp mkstemps mkdtemp/],
- 'seekable' => [qw/ SEEK_SET SEEK_CUR SEEK_END /],
- );
-
-# add contents of these tags to @EXPORT
-Exporter::export_tags('POSIX','mktemp','seekable');
-
-# This is a list of characters that can be used in random filenames
-
-my @CHARS = (qw/ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
- a b c d e f g h i j k l m n o p q r s t u v w x y z
- 0 1 2 3 4 5 6 7 8 9 _
- /);
-
-# Maximum number of tries to make a temp file before failing
-
-use constant MAX_TRIES => 1000;
-
-# Minimum number of X characters that should be in a template
-use constant MINX => 4;
-
-# Default template when no template supplied
-
-use constant TEMPXXX => 'X' x 10;
-
-# Constants for the security level
-
-use constant STANDARD => 0;
-use constant MEDIUM => 1;
-use constant HIGH => 2;
-
-# OPENFLAGS. If we defined the flag to use with Sysopen here this gives
-# us an optimisation when many temporary files are requested
-
-my $OPENFLAGS = O_CREAT | O_EXCL | O_RDWR;
-my $LOCKFLAG;
-
-unless ($^O eq 'MacOS') {
- for my $oflag (qw/ NOFOLLOW BINARY LARGEFILE NOINHERIT /) {
- my ($bit, $func) = (0, "Fcntl::O_" . $oflag);
- no strict 'refs';
- $OPENFLAGS |= $bit if eval {
- # Make sure that redefined die handlers do not cause problems
- # e.g. CGI::Carp
- local $SIG{__DIE__} = sub {};
- local $SIG{__WARN__} = sub {};
- $bit = &$func();
- 1;
- };
- }
- # Special case O_EXLOCK
- $LOCKFLAG = eval {
- local $SIG{__DIE__} = sub {};
- local $SIG{__WARN__} = sub {};
- &Fcntl::O_EXLOCK();
- };
-}
-
-# On some systems the O_TEMPORARY flag can be used to tell the OS
-# to automatically remove the file when it is closed. This is fine
-# in most cases but not if tempfile is called with UNLINK=>0 and
-# the filename is requested -- in the case where the filename is to
-# be passed to another routine. This happens on windows. We overcome
-# this by using a second open flags variable
-
-my $OPENTEMPFLAGS = $OPENFLAGS;
-unless ($^O eq 'MacOS') {
- for my $oflag (qw/ TEMPORARY /) {
- my ($bit, $func) = (0, "Fcntl::O_" . $oflag);
- local($@);
- no strict 'refs';
- $OPENTEMPFLAGS |= $bit if eval {
- # Make sure that redefined die handlers do not cause problems
- # e.g. CGI::Carp
- local $SIG{__DIE__} = sub {};
- local $SIG{__WARN__} = sub {};
- $bit = &$func();
- 1;
- };
- }
-}
-
-# Private hash tracking which files have been created by each process id via the OO interface
-my %FILES_CREATED_BY_OBJECT;
-
-# INTERNAL ROUTINES - not to be used outside of package
-
-# Generic routine for getting a temporary filename
-# modelled on OpenBSD _gettemp() in mktemp.c
-
-# The template must contain X's that are to be replaced
-# with the random values
-
-# Arguments:
-
-# TEMPLATE - string containing the XXXXX's that is converted
-# to a random filename and opened if required
-
-# Optionally, a hash can also be supplied containing specific options
-# "open" => if true open the temp file, else just return the name
-# default is 0
-# "mkdir"=> if true, we are creating a temp directory rather than tempfile
-# default is 0
-# "suffixlen" => number of characters at end of PATH to be ignored.
-# default is 0.
-# "unlink_on_close" => indicates that, if possible, the OS should remove
-# the file as soon as it is closed. Usually indicates
-# use of the O_TEMPORARY flag to sysopen.
-# Usually irrelevant on unix
-# "use_exlock" => Indicates that O_EXLOCK should be used. Default is true.
-
-# Optionally a reference to a scalar can be passed into the function
-# On error this will be used to store the reason for the error
-# "ErrStr" => \$errstr
-
-# "open" and "mkdir" can not both be true
-# "unlink_on_close" is not used when "mkdir" is true.
-
-# The default options are equivalent to mktemp().
-
-# Returns:
-# filehandle - open file handle (if called with doopen=1, else undef)
-# temp name - name of the temp file or directory
-
-# For example:
-# ($fh, $name) = _gettemp($template, "open" => 1);
-
-# for the current version, failures are associated with
-# stored in an error string and returned to give the reason whilst debugging
-# This routine is not called by any external function
-sub _gettemp {
-
- croak 'Usage: ($fh, $name) = _gettemp($template, OPTIONS);'
- unless scalar(@_) >= 1;
-
- # the internal error string - expect it to be overridden
- # Need this in case the caller decides not to supply us a value
- # need an anonymous scalar
- my $tempErrStr;
-
- # Default options
- my %options = (
- "open" => 0,
- "mkdir" => 0,
- "suffixlen" => 0,
- "unlink_on_close" => 0,
- "use_exlock" => 1,
- "ErrStr" => \$tempErrStr,
- );
-
- # Read the template
- my $template = shift;
- if (ref($template)) {
- # Use a warning here since we have not yet merged ErrStr
- carp "File::Temp::_gettemp: template must not be a reference";
- return ();
- }
-
- # Check that the number of entries on stack are even
- if (scalar(@_) % 2 != 0) {
- # Use a warning here since we have not yet merged ErrStr
- carp "File::Temp::_gettemp: Must have even number of options";
- return ();
- }
-
- # Read the options and merge with defaults
- %options = (%options, @_) if @_;
-
- # Make sure the error string is set to undef
- ${$options{ErrStr}} = undef;
-
- # Can not open the file and make a directory in a single call
- if ($options{"open"} && $options{"mkdir"}) {
- ${$options{ErrStr}} = "doopen and domkdir can not both be true\n";
- return ();
- }
-
- # Find the start of the end of the Xs (position of last X)
- # Substr starts from 0
- my $start = length($template) - 1 - $options{"suffixlen"};
-
- # Check that we have at least MINX x X (e.g. 'XXXX") at the end of the string
- # (taking suffixlen into account). Any fewer is insecure.
-
- # Do it using substr - no reason to use a pattern match since
- # we know where we are looking and what we are looking for
-
- if (substr($template, $start - MINX + 1, MINX) ne 'X' x MINX) {
- ${$options{ErrStr}} = "The template must end with at least ".
- MINX . " 'X' characters\n";
- return ();
- }
-
- # Replace all the X at the end of the substring with a
- # random character or just all the XX at the end of a full string.
- # Do it as an if, since the suffix adjusts which section to replace
- # and suffixlen=0 returns nothing if used in the substr directly
- # and generate a full path from the template
-
- my $path = _replace_XX($template, $options{"suffixlen"});
-
- # Split the path into constituent parts - eventually we need to check
- # whether the directory exists
- # We need to know whether we are making a temp directory
- # or a tempfile
-
- my ($volume, $directories, $file);
- my $parent; # parent directory
- if ($options{"mkdir"}) {
- # There is no filename at the end
- ($volume, $directories, $file) = File::Spec->splitpath( $path, 1);
-
- # The parent is then $directories without the last directory
- # Split the directory and put it back together again
- my @dirs = File::Spec->splitdir($directories);
-
- # If @dirs only has one entry (i.e. the directory template) that means
- # we are in the current directory
- if ($#dirs == 0) {
- $parent = File::Spec->curdir;
- } else {
-
- if ($^O eq 'VMS') { # need volume to avoid relative dir spec
- $parent = File::Spec->catdir($volume, @dirs[0..$#dirs-1]);
- $parent = 'sys$disk:[]' if $parent eq '';
- } else {
-
- # Put it back together without the last one
- $parent = File::Spec->catdir(@dirs[0..$#dirs-1]);
-
- # ...and attach the volume (no filename)
- $parent = File::Spec->catpath($volume, $parent, '');
- }
-
- }
-
- } else {
-
- # Get rid of the last filename (use File::Basename for this?)
- ($volume, $directories, $file) = File::Spec->splitpath( $path );
-
- # Join up without the file part
- $parent = File::Spec->catpath($volume,$directories,'');
-
- # If $parent is empty replace with curdir
- $parent = File::Spec->curdir
- unless $directories ne '';
-
- }
-
- # Check that the parent directories exist
- # Do this even for the case where we are simply returning a name
- # not a file -- no point returning a name that includes a directory
- # that does not exist or is not writable
-
- unless (-e $parent) {
- ${$options{ErrStr}} = "Parent directory ($parent) does not exist";
- return ();
- }
- unless (-d $parent) {
- ${$options{ErrStr}} = "Parent directory ($parent) is not a directory";
- return ();
- }
-
- # Check the stickiness of the directory and chown giveaway if required
- # If the directory is world writable the sticky bit
- # must be set
-
- if (File::Temp->safe_level == MEDIUM) {
- my $safeerr;
- unless (_is_safe($parent,\$safeerr)) {
- ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)";
- return ();
- }
- } elsif (File::Temp->safe_level == HIGH) {
- my $safeerr;
- unless (_is_verysafe($parent, \$safeerr)) {
- ${$options{ErrStr}} = "Parent directory ($parent) is not safe ($safeerr)";
- return ();
- }
- }
-
- # Now try MAX_TRIES time to open the file
- for (my $i = 0; $i < MAX_TRIES; $i++) {
-
- # Try to open the file if requested
- if ($options{"open"}) {
- my $fh;
-
- # If we are running before perl5.6.0 we can not auto-vivify
- if ($] < 5.006) {
- $fh = &Symbol::gensym;
- }
-
- # Try to make sure this will be marked close-on-exec
- # XXX: Win32 doesn't respect this, nor the proper fcntl,
- # but may have O_NOINHERIT. This may or may not be in Fcntl.
- local $^F = 2;
-
- # Attempt to open the file
- my $open_success = undef;
- if ( $^O eq 'VMS' and $options{"unlink_on_close"} && !$KEEP_ALL) {
- # make it auto delete on close by setting FAB$V_DLT bit
- $fh = VMS::Stdio::vmssysopen($path, $OPENFLAGS, 0600, 'fop=dlt');
- $open_success = $fh;
- } else {
- my $flags = ( ($options{"unlink_on_close"} && !$KEEP_ALL) ?
- $OPENTEMPFLAGS :
- $OPENFLAGS );
- $flags |= $LOCKFLAG if (defined $LOCKFLAG && $options{use_exlock});
- $open_success = sysopen($fh, $path, $flags, 0600);
- }
- if ( $open_success ) {
-
- # in case of odd umask force rw
- chmod(0600, $path);
-
- # Opened successfully - return file handle and name
- return ($fh, $path);
-
- } else {
-
- # Error opening file - abort with error
- # if the reason was anything but EEXIST
- unless ($!{EEXIST}) {
- ${$options{ErrStr}} = "Could not create temp file $path: $!";
- return ();
- }
-
- # Loop round for another try
-
- }
- } elsif ($options{"mkdir"}) {
-
- # Open the temp directory
- if (mkdir( $path, 0700)) {
- # in case of odd umask
- chmod(0700, $path);
-
- return undef, $path;
- } else {
-
- # Abort with error if the reason for failure was anything
- # except EEXIST
- unless ($!{EEXIST}) {
- ${$options{ErrStr}} = "Could not create directory $path: $!";
- return ();
- }
-
- # Loop round for another try
-
- }
-
- } else {
-
- # Return true if the file can not be found
- # Directory has been checked previously
-
- return (undef, $path) unless -e $path;
-
- # Try again until MAX_TRIES
-
- }
-
- # Did not successfully open the tempfile/dir
- # so try again with a different set of random letters
- # No point in trying to increment unless we have only
- # 1 X say and the randomness could come up with the same
- # file MAX_TRIES in a row.
-
- # Store current attempt - in principal this implies that the
- # 3rd time around the open attempt that the first temp file
- # name could be generated again. Probably should store each
- # attempt and make sure that none are repeated
-
- my $original = $path;
- my $counter = 0; # Stop infinite loop
- my $MAX_GUESS = 50;
-
- do {
-
- # Generate new name from original template
- $path = _replace_XX($template, $options{"suffixlen"});
-
- $counter++;
-
- } until ($path ne $original || $counter > $MAX_GUESS);
-
- # Check for out of control looping
- if ($counter > $MAX_GUESS) {
- ${$options{ErrStr}} = "Tried to get a new temp name different to the previous value $MAX_GUESS times.\nSomething wrong with template?? ($template)";
- return ();
- }
-
- }
-
- # If we get here, we have run out of tries
- ${ $options{ErrStr} } = "Have exceeded the maximum number of attempts ("
- . MAX_TRIES . ") to open temp file/dir";
-
- return ();
-
-}
-
-# Internal routine to replace the XXXX... with random characters
-# This has to be done by _gettemp() every time it fails to
-# open a temp file/dir
-
-# Arguments: $template (the template with XXX),
-# $ignore (number of characters at end to ignore)
-
-# Returns: modified template
-
-sub _replace_XX {
-
- croak 'Usage: _replace_XX($template, $ignore)'
- unless scalar(@_) == 2;
-
- my ($path, $ignore) = @_;
-
- # Do it as an if, since the suffix adjusts which section to replace
- # and suffixlen=0 returns nothing if used in the substr directly
- # Alternatively, could simply set $ignore to length($path)-1
- # Don't want to always use substr when not required though.
- my $end = ( $] >= 5.006 ? "\\z" : "\\Z" );
-
- if ($ignore) {
- substr($path, 0, - $ignore) =~ s/X(?=X*$end)/$CHARS[ int( rand( @CHARS ) ) ]/ge;
- } else {
- $path =~ s/X(?=X*$end)/$CHARS[ int( rand( @CHARS ) ) ]/ge;
- }
- return $path;
-}
-
-# Internal routine to force a temp file to be writable after
-# it is created so that we can unlink it. Windows seems to occasionally
-# force a file to be readonly when written to certain temp locations
-sub _force_writable {
- my $file = shift;
- chmod 0600, $file;
-}
-
-# internal routine to check to see if the directory is safe
-# First checks to see if the directory is not owned by the
-# current user or root. Then checks to see if anyone else
-# can write to the directory and if so, checks to see if
-# it has the sticky bit set
-
-# Will not work on systems that do not support sticky bit
-
-#Args: directory path to check
-# Optionally: reference to scalar to contain error message
-# Returns true if the path is safe and false otherwise.
-# Returns undef if can not even run stat() on the path
-
-# This routine based on version written by Tom Christiansen
-
-# Presumably, by the time we actually attempt to create the
-# file or directory in this directory, it may not be safe
-# anymore... Have to run _is_safe directly after the open.
-
-sub _is_safe {
-
- my $path = shift;
- my $err_ref = shift;
-
- # Stat path
- my @info = stat($path);
- unless (scalar(@info)) {
- $$err_ref = "stat(path) returned no values";
- return 0;
- }
- ;
- return 1 if $^O eq 'VMS'; # owner delete control at file level
-
- # Check to see whether owner is neither superuser (or a system uid) nor me
- # Use the effective uid from the $> variable
- # UID is in [4]
- if ($info[4] > File::Temp->top_system_uid() && $info[4] != $>) {
-
- Carp::cluck(sprintf "uid=$info[4] topuid=%s euid=$> path='$path'",
- File::Temp->top_system_uid());
-
- $$err_ref = "Directory owned neither by root nor the current user"
- if ref($err_ref);
- return 0;
- }
-
- # check whether group or other can write file
- # use 066 to detect either reading or writing
- # use 022 to check writability
- # Do it with S_IWOTH and S_IWGRP for portability (maybe)
- # mode is in info[2]
- if (($info[2] & &Fcntl::S_IWGRP) || # Is group writable?
- ($info[2] & &Fcntl::S_IWOTH) ) { # Is world writable?
- # Must be a directory
- unless (-d $path) {
- $$err_ref = "Path ($path) is not a directory"
- if ref($err_ref);
- return 0;
- }
- # Must have sticky bit set
- unless (-k $path) {
- $$err_ref = "Sticky bit not set on $path when dir is group|world writable"
- if ref($err_ref);
- return 0;
- }
- }
-
- return 1;
-}
-
-# Internal routine to check whether a directory is safe
-# for temp files. Safer than _is_safe since it checks for
-# the possibility of chown giveaway and if that is a possibility
-# checks each directory in the path to see if it is safe (with _is_safe)
-
-# If _PC_CHOWN_RESTRICTED is not set, does the full test of each
-# directory anyway.
-
-# Takes optional second arg as scalar ref to error reason
-
-sub _is_verysafe {
-
- # Need POSIX - but only want to bother if really necessary due to overhead
- require POSIX;
-
- my $path = shift;
- print "_is_verysafe testing $path\n" if $DEBUG;
- return 1 if $^O eq 'VMS'; # owner delete control at file level
-
- my $err_ref = shift;
-
- # Should Get the value of _PC_CHOWN_RESTRICTED if it is defined
- # and If it is not there do the extensive test
- local($@);
- my $chown_restricted;
- $chown_restricted = &POSIX::_PC_CHOWN_RESTRICTED()
- if eval { &POSIX::_PC_CHOWN_RESTRICTED(); 1};
-
- # If chown_resticted is set to some value we should test it
- if (defined $chown_restricted) {
-
- # Return if the current directory is safe
- return _is_safe($path,$err_ref) if POSIX::sysconf( $chown_restricted );
-
- }
-
- # To reach this point either, the _PC_CHOWN_RESTRICTED symbol
- # was not available or the symbol was there but chown giveaway
- # is allowed. Either way, we now have to test the entire tree for
- # safety.
-
- # Convert path to an absolute directory if required
- unless (File::Spec->file_name_is_absolute($path)) {
- $path = File::Spec->rel2abs($path);
- }
-
- # Split directory into components - assume no file
- my ($volume, $directories, undef) = File::Spec->splitpath( $path, 1);
-
- # Slightly less efficient than having a function in File::Spec
- # to chop off the end of a directory or even a function that
- # can handle ../ in a directory tree
- # Sometimes splitdir() returns a blank at the end
- # so we will probably check the bottom directory twice in some cases
- my @dirs = File::Spec->splitdir($directories);
-
- # Concatenate one less directory each time around
- foreach my $pos (0.. $#dirs) {
- # Get a directory name
- my $dir = File::Spec->catpath($volume,
- File::Spec->catdir(@dirs[0.. $#dirs - $pos]),
- ''
- );
-
- print "TESTING DIR $dir\n" if $DEBUG;
-
- # Check the directory
- return 0 unless _is_safe($dir,$err_ref);
-
- }
-
- return 1;
-}
-
-# internal routine to determine whether unlink works on this
-# platform for files that are currently open.
-# Returns true if we can, false otherwise.
-
-# Currently WinNT, OS/2 and VMS can not unlink an opened file
-# On VMS this is because the O_EXCL flag is used to open the
-# temporary file. Currently I do not know enough about the issues
-# on VMS to decide whether O_EXCL is a requirement.
-
-sub _can_unlink_opened_file {
-
- if (grep { $^O eq $_ } qw/MSWin32 os2 VMS dos MacOS haiku/) {
- return 0;
- } else {
- return 1;
- }
-
-}
-
-# internal routine to decide which security levels are allowed
-# see safe_level() for more information on this
-
-# Controls whether the supplied security level is allowed
-
-# $cando = _can_do_level( $level )
-
-sub _can_do_level {
-
- # Get security level
- my $level = shift;
-
- # Always have to be able to do STANDARD
- return 1 if $level == STANDARD;
-
- # Currently, the systems that can do HIGH or MEDIUM are identical
- if ( $^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'cygwin' || $^O eq 'dos' || $^O eq 'MacOS' || $^O eq 'mpeix') {
- return 0;
- } else {
- return 1;
- }
-
-}
-
-# This routine sets up a deferred unlinking of a specified
-# filename and filehandle. It is used in the following cases:
-# - Called by unlink0 if an opened file can not be unlinked
-# - Called by tempfile() if files are to be removed on shutdown
-# - Called by tempdir() if directories are to be removed on shutdown
-
-# Arguments:
-# _deferred_unlink( $fh, $fname, $isdir );
-#
-# - filehandle (so that it can be explicitly closed if open
-# - filename (the thing we want to remove)
-# - isdir (flag to indicate that we are being given a directory)
-# [and hence no filehandle]
-
-# Status is not referred to since all the magic is done with an END block
-
-{
- # Will set up two lexical variables to contain all the files to be
- # removed. One array for files, another for directories They will
- # only exist in this block.
-
- # This means we only have to set up a single END block to remove
- # all files.
-
- # in order to prevent child processes inadvertently deleting the parent
- # temp files we use a hash to store the temp files and directories
- # created by a particular process id.
-
- # %files_to_unlink contains values that are references to an array of
- # array references containing the filehandle and filename associated with
- # the temp file.
- my (%files_to_unlink, %dirs_to_unlink);
-
- # Set up an end block to use these arrays
- END {
- local($., $@, $!, $^E, $?);
- cleanup(at_exit => 1);
- }
-
- # Cleanup function. Always triggered on END (with at_exit => 1) but
- # can be invoked manually.
- sub cleanup {
- my %h = @_;
- my $at_exit = delete $h{at_exit};
- $at_exit = 0 if not defined $at_exit;
- { my @k = sort keys %h; die "unrecognized parameters: @k" if @k }
-
- if (!$KEEP_ALL) {
- # Files
- my @files = (exists $files_to_unlink{$$} ?
- @{ $files_to_unlink{$$} } : () );
- foreach my $file (@files) {
- # close the filehandle without checking its state
- # in order to make real sure that this is closed
- # if its already closed then I don't care about the answer
- # probably a better way to do this
- close($file->[0]); # file handle is [0]
-
- if (-f $file->[1]) { # file name is [1]
- _force_writable( $file->[1] ); # for windows
- unlink $file->[1] or warn "Error removing ".$file->[1];
- }
- }
- # Dirs
- my @dirs = (exists $dirs_to_unlink{$$} ?
- @{ $dirs_to_unlink{$$} } : () );
- my ($cwd, $cwd_to_remove);
- foreach my $dir (@dirs) {
- if (-d $dir) {
- # Some versions of rmtree will abort if you attempt to remove
- # the directory you are sitting in. For automatic cleanup
- # at program exit, we avoid this by chdir()ing out of the way
- # first. If not at program exit, it's best not to mess with the
- # current directory, so just let it fail with a warning.
- if ($at_exit) {
- $cwd = Cwd::abs_path(File::Spec->curdir) if not defined $cwd;
- my $abs = Cwd::abs_path($dir);
- if ($abs eq $cwd) {
- $cwd_to_remove = $dir;
- next;
- }
- }
- eval { rmtree($dir, $DEBUG, 0); };
- warn $@ if ($@ && $^W);
- }
- }
-
- if (defined $cwd_to_remove) {
- # We do need to clean up the current directory, and everything
- # else is done, so get out of there and remove it.
- chdir $cwd_to_remove or die "cannot chdir to $cwd_to_remove: $!";
- my $updir = File::Spec->updir;
- chdir $updir or die "cannot chdir to $updir: $!";
- eval { rmtree($cwd_to_remove, $DEBUG, 0); };
- warn $@ if ($@ && $^W);
- }
-
- # clear the arrays
- @{ $files_to_unlink{$$} } = ()
- if exists $files_to_unlink{$$};
- @{ $dirs_to_unlink{$$} } = ()
- if exists $dirs_to_unlink{$$};
- }
- }
-
- # This is the sub called to register a file for deferred unlinking
- # This could simply store the input parameters and defer everything
- # until the END block. For now we do a bit of checking at this
- # point in order to make sure that (1) we have a file/dir to delete
- # and (2) we have been called with the correct arguments.
- sub _deferred_unlink {
-
- croak 'Usage: _deferred_unlink($fh, $fname, $isdir)'
- unless scalar(@_) == 3;
-
- my ($fh, $fname, $isdir) = @_;
-
- warn "Setting up deferred removal of $fname\n"
- if $DEBUG;
-
- # make sure we save the absolute path for later cleanup
- # OK to untaint because we only ever use this internally
- # as a file path, never interpolating into the shell
- $fname = Cwd::abs_path($fname);
- ($fname) = $fname =~ /^(.*)$/;
-
- # If we have a directory, check that it is a directory
- if ($isdir) {
-
- if (-d $fname) {
-
- # Directory exists so store it
- # first on VMS turn []foo into [.foo] for rmtree
- $fname = VMS::Filespec::vmspath($fname) if $^O eq 'VMS';
- $dirs_to_unlink{$$} = []
- unless exists $dirs_to_unlink{$$};
- push (@{ $dirs_to_unlink{$$} }, $fname);
-
- } else {
- carp "Request to remove directory $fname could not be completed since it does not exist!\n" if $^W;
- }
-
- } else {
-
- if (-f $fname) {
-
- # file exists so store handle and name for later removal
- $files_to_unlink{$$} = []
- unless exists $files_to_unlink{$$};
- push(@{ $files_to_unlink{$$} }, [$fh, $fname]);
-
- } else {
- carp "Request to remove file $fname could not be completed since it is not there!\n" if $^W;
- }
-
- }
-
- }
-
-}
-
-# normalize argument keys to upper case and do consistent handling
-# of leading template vs TEMPLATE
-sub _parse_args {
- my $leading_template = (scalar(@_) % 2 == 1 ? shift(@_) : '' );
- my %args = @_;
- %args = map { uc($_), $args{$_} } keys %args;
-
- # template (store it in an array so that it will
- # disappear from the arg list of tempfile)
- my @template = (
- exists $args{TEMPLATE} ? $args{TEMPLATE} :
- $leading_template ? $leading_template : ()
- );
- delete $args{TEMPLATE};
-
- return( \@template, \%args );
-}
-
-sub new {
- my $proto = shift;
- my $class = ref($proto) || $proto;
-
- my ($maybe_template, $args) = _parse_args(@_);
-
- # see if they are unlinking (defaulting to yes)
- my $unlink = (exists $args->{UNLINK} ? $args->{UNLINK} : 1 );
- delete $args->{UNLINK};
-
- # Protect OPEN
- delete $args->{OPEN};
-
- # Open the file and retain file handle and file name
- my ($fh, $path) = tempfile( @$maybe_template, %$args );
-
- print "Tmp: $fh - $path\n" if $DEBUG;
-
- # Store the filename in the scalar slot
- ${*$fh} = $path;
-
- # Cache the filename by pid so that the destructor can decide whether to remove it
- $FILES_CREATED_BY_OBJECT{$$}{$path} = 1;
-
- # Store unlink information in hash slot (plus other constructor info)
- %{*$fh} = %$args;
-
- # create the object
- bless $fh, $class;
-
- # final method-based configuration
- $fh->unlink_on_destroy( $unlink );
-
- return $fh;
-}
-
-sub newdir {
- my $self = shift;
-
- my ($maybe_template, $args) = _parse_args(@_);
-
- # handle CLEANUP without passing CLEANUP to tempdir
- my $cleanup = (exists $args->{CLEANUP} ? $args->{CLEANUP} : 1 );
- delete $args->{CLEANUP};
-
- my $tempdir = tempdir( @$maybe_template, %$args);
-
- # get a safe absolute path for cleanup, just like
- # happens in _deferred_unlink
- my $real_dir = Cwd::abs_path( $tempdir );
- ($real_dir) = $real_dir =~ /^(.*)$/;
-
- return bless { DIRNAME => $tempdir,
- REALNAME => $real_dir,
- CLEANUP => $cleanup,
- LAUNCHPID => $$,
- }, "File::Temp::Dir";
-}
-
-sub filename {
- my $self = shift;
- return ${*$self};
-}
-
-sub STRINGIFY {
- my $self = shift;
- return $self->filename;
-}
-
-# For reference, can't use '0+'=>\&Scalar::Util::refaddr directly because
-# refaddr() demands one parameter only, whereas overload.pm calls with three
-# even for unary operations like '0+'.
-sub NUMIFY {
- return refaddr($_[0]);
-}
-
-sub unlink_on_destroy {
- my $self = shift;
- if (@_) {
- ${*$self}{UNLINK} = shift;
- }
- return ${*$self}{UNLINK};
-}
-
-sub DESTROY {
- local($., $@, $!, $^E, $?);
- my $self = shift;
-
- # Make sure we always remove the file from the global hash
- # on destruction. This prevents the hash from growing uncontrollably
- # and post-destruction there is no reason to know about the file.
- my $file = $self->filename;
- my $was_created_by_proc;
- if (exists $FILES_CREATED_BY_OBJECT{$$}{$file}) {
- $was_created_by_proc = 1;
- delete $FILES_CREATED_BY_OBJECT{$$}{$file};
- }
-
- if (${*$self}{UNLINK} && !$KEEP_ALL) {
- print "# ---------> Unlinking $self\n" if $DEBUG;
-
- # only delete if this process created it
- return unless $was_created_by_proc;
-
- # The unlink1 may fail if the file has been closed
- # by the caller. This leaves us with the decision
- # of whether to refuse to remove the file or simply
- # do an unlink without test. Seems to be silly
- # to do this when we are trying to be careful
- # about security
- _force_writable( $file ); # for windows
- unlink1( $self, $file )
- or unlink($file);
- }
-}
-
-sub tempfile {
- if ( @_ && $_[0] eq 'File::Temp' ) {
- croak "'tempfile' can't be called as a method";
- }
- # Can not check for argument count since we can have any
- # number of args
-
- # Default options
- my %options = (
- "DIR" => undef, # Directory prefix
- "SUFFIX" => '', # Template suffix
- "UNLINK" => 0, # Do not unlink file on exit
- "OPEN" => 1, # Open file
- "TMPDIR" => 0, # Place tempfile in tempdir if template specified
- "EXLOCK" => 1, # Open file with O_EXLOCK
- );
-
- # Check to see whether we have an odd or even number of arguments
- my ($maybe_template, $args) = _parse_args(@_);
- my $template = @$maybe_template ? $maybe_template->[0] : undef;
-
- # Read the options and merge with defaults
- %options = (%options, %$args);
-
- # First decision is whether or not to open the file
- if (! $options{"OPEN"}) {
-
- warn "tempfile(): temporary filename requested but not opened.\nPossibly unsafe, consider using tempfile() with OPEN set to true\n"
- if $^W;
-
- }
-
- if ($options{"DIR"} and $^O eq 'VMS') {
-
- # on VMS turn []foo into [.foo] for concatenation
- $options{"DIR"} = VMS::Filespec::vmspath($options{"DIR"});
- }
-
- # Construct the template
-
- # Have a choice of trying to work around the mkstemp/mktemp/tmpnam etc
- # functions or simply constructing a template and using _gettemp()
- # explicitly. Go for the latter
-
- # First generate a template if not defined and prefix the directory
- # If no template must prefix the temp directory
- if (defined $template) {
- # End up with current directory if neither DIR not TMPDIR are set
- if ($options{"DIR"}) {
-
- $template = File::Spec->catfile($options{"DIR"}, $template);
-
- } elsif ($options{TMPDIR}) {
-
- $template = File::Spec->catfile(File::Spec->tmpdir, $template );
-
- }
-
- } else {
-
- if ($options{"DIR"}) {
-
- $template = File::Spec->catfile($options{"DIR"}, TEMPXXX);
-
- } else {
-
- $template = File::Spec->catfile(File::Spec->tmpdir, TEMPXXX);
-
- }
-
- }
-
- # Now add a suffix
- $template .= $options{"SUFFIX"};
-
- # Determine whether we should tell _gettemp to unlink the file
- # On unix this is irrelevant and can be worked out after the file is
- # opened (simply by unlinking the open filehandle). On Windows or VMS
- # we have to indicate temporary-ness when we open the file. In general
- # we only want a true temporary file if we are returning just the
- # filehandle - if the user wants the filename they probably do not
- # want the file to disappear as soon as they close it (which may be
- # important if they want a child process to use the file)
- # For this reason, tie unlink_on_close to the return context regardless
- # of OS.
- my $unlink_on_close = ( wantarray ? 0 : 1);
-
- # Create the file
- my ($fh, $path, $errstr);
- croak "Error in tempfile() using template $template: $errstr"
- unless (($fh, $path) = _gettemp($template,
- "open" => $options{'OPEN'},
- "mkdir"=> 0 ,
- "unlink_on_close" => $unlink_on_close,
- "suffixlen" => length($options{'SUFFIX'}),
- "ErrStr" => \$errstr,
- "use_exlock" => $options{EXLOCK},
- ) );
-
- # Set up an exit handler that can do whatever is right for the
- # system. This removes files at exit when requested explicitly or when
- # system is asked to unlink_on_close but is unable to do so because
- # of OS limitations.
- # The latter should be achieved by using a tied filehandle.
- # Do not check return status since this is all done with END blocks.
- _deferred_unlink($fh, $path, 0) if $options{"UNLINK"};
-
- # Return
- if (wantarray()) {
-
- if ($options{'OPEN'}) {
- return ($fh, $path);
- } else {
- return (undef, $path);
- }
-
- } else {
-
- # Unlink the file. It is up to unlink0 to decide what to do with
- # this (whether to unlink now or to defer until later)
- unlink0($fh, $path) or croak "Error unlinking file $path using unlink0";
-
- # Return just the filehandle.
- return $fh;
- }
-
-}
-
-# '
-
-sub tempdir {
- if ( @_ && $_[0] eq 'File::Temp' ) {
- croak "'tempdir' can't be called as a method";
- }
-
- # Can not check for argument count since we can have any
- # number of args
-
- # Default options
- my %options = (
- "CLEANUP" => 0, # Remove directory on exit
- "DIR" => '', # Root directory
- "TMPDIR" => 0, # Use tempdir with template
- );
-
- # Check to see whether we have an odd or even number of arguments
- my ($maybe_template, $args) = _parse_args(@_);
- my $template = @$maybe_template ? $maybe_template->[0] : undef;
-
- # Read the options and merge with defaults
- %options = (%options, %$args);
-
- # Modify or generate the template
-
- # Deal with the DIR and TMPDIR options
- if (defined $template) {
-
- # Need to strip directory path if using DIR or TMPDIR
- if ($options{'TMPDIR'} || $options{'DIR'}) {
-
- # Strip parent directory from the filename
- #
- # There is no filename at the end
- $template = VMS::Filespec::vmspath($template) if $^O eq 'VMS';
- my ($volume, $directories, undef) = File::Spec->splitpath( $template, 1);
-
- # Last directory is then our template
- $template = (File::Spec->splitdir($directories))[-1];
-
- # Prepend the supplied directory or temp dir
- if ($options{"DIR"}) {
-
- $template = File::Spec->catdir($options{"DIR"}, $template);
-
- } elsif ($options{TMPDIR}) {
-
- # Prepend tmpdir
- $template = File::Spec->catdir(File::Spec->tmpdir, $template);
-
- }
-
- }
-
- } else {
-
- if ($options{"DIR"}) {
-
- $template = File::Spec->catdir($options{"DIR"}, TEMPXXX);
-
- } else {
-
- $template = File::Spec->catdir(File::Spec->tmpdir, TEMPXXX);
-
- }
-
- }
-
- # Create the directory
- my $tempdir;
- my $suffixlen = 0;
- if ($^O eq 'VMS') { # dir names can end in delimiters
- $template =~ m/([\.\]:>]+)$/;
- $suffixlen = length($1);
- }
- if ( ($^O eq 'MacOS') && (substr($template, -1) eq ':') ) {
- # dir name has a trailing ':'
- ++$suffixlen;
- }
-
- my $errstr;
- croak "Error in tempdir() using $template: $errstr"
- unless ((undef, $tempdir) = _gettemp($template,
- "open" => 0,
- "mkdir"=> 1 ,
- "suffixlen" => $suffixlen,
- "ErrStr" => \$errstr,
- ) );
-
- # Install exit handler; must be dynamic to get lexical
- if ( $options{'CLEANUP'} && -d $tempdir) {
- _deferred_unlink(undef, $tempdir, 1);
- }
-
- # Return the dir name
- return $tempdir;
-
-}
-
-sub mkstemp {
-
- croak "Usage: mkstemp(template)"
- if scalar(@_) != 1;
-
- my $template = shift;
-
- my ($fh, $path, $errstr);
- croak "Error in mkstemp using $template: $errstr"
- unless (($fh, $path) = _gettemp($template,
- "open" => 1,
- "mkdir"=> 0 ,
- "suffixlen" => 0,
- "ErrStr" => \$errstr,
- ) );
-
- if (wantarray()) {
- return ($fh, $path);
- } else {
- return $fh;
- }
-
-}
-
-sub mkstemps {
-
- croak "Usage: mkstemps(template, suffix)"
- if scalar(@_) != 2;
-
- my $template = shift;
- my $suffix = shift;
-
- $template .= $suffix;
-
- my ($fh, $path, $errstr);
- croak "Error in mkstemps using $template: $errstr"
- unless (($fh, $path) = _gettemp($template,
- "open" => 1,
- "mkdir"=> 0 ,
- "suffixlen" => length($suffix),
- "ErrStr" => \$errstr,
- ) );
-
- if (wantarray()) {
- return ($fh, $path);
- } else {
- return $fh;
- }
-
-}
-
-#' # for emacs
-
-sub mkdtemp {
-
- croak "Usage: mkdtemp(template)"
- if scalar(@_) != 1;
-
- my $template = shift;
- my $suffixlen = 0;
- if ($^O eq 'VMS') { # dir names can end in delimiters
- $template =~ m/([\.\]:>]+)$/;
- $suffixlen = length($1);
- }
- if ( ($^O eq 'MacOS') && (substr($template, -1) eq ':') ) {
- # dir name has a trailing ':'
- ++$suffixlen;
- }
- my ($junk, $tmpdir, $errstr);
- croak "Error creating temp directory from template $template\: $errstr"
- unless (($junk, $tmpdir) = _gettemp($template,
- "open" => 0,
- "mkdir"=> 1 ,
- "suffixlen" => $suffixlen,
- "ErrStr" => \$errstr,
- ) );
-
- return $tmpdir;
-
-}
-
-sub mktemp {
-
- croak "Usage: mktemp(template)"
- if scalar(@_) != 1;
-
- my $template = shift;
-
- my ($tmpname, $junk, $errstr);
- croak "Error getting name to temp file from template $template: $errstr"
- unless (($junk, $tmpname) = _gettemp($template,
- "open" => 0,
- "mkdir"=> 0 ,
- "suffixlen" => 0,
- "ErrStr" => \$errstr,
- ) );
-
- return $tmpname;
-}
-
-sub tmpnam {
-
- # Retrieve the temporary directory name
- my $tmpdir = File::Spec->tmpdir;
-
- croak "Error temporary directory is not writable"
- if $tmpdir eq '';
-
- # Use a ten character template and append to tmpdir
- my $template = File::Spec->catfile($tmpdir, TEMPXXX);
-
- if (wantarray() ) {
- return mkstemp($template);
- } else {
- return mktemp($template);
- }
-
-}
-
-sub tmpfile {
-
- # Simply call tmpnam() in a list context
- my ($fh, $file) = tmpnam();
-
- # Make sure file is removed when filehandle is closed
- # This will fail on NFS
- unlink0($fh, $file)
- or return undef;
-
- return $fh;
-
-}
-
-sub tempnam {
-
- croak 'Usage tempnam($dir, $prefix)' unless scalar(@_) == 2;
-
- my ($dir, $prefix) = @_;
-
- # Add a string to the prefix
- $prefix .= 'XXXXXXXX';
-
- # Concatenate the directory to the file
- my $template = File::Spec->catfile($dir, $prefix);
-
- return mktemp($template);
-
-}
-
-sub unlink0 {
-
- croak 'Usage: unlink0(filehandle, filename)'
- unless scalar(@_) == 2;
-
- # Read args
- my ($fh, $path) = @_;
-
- cmpstat($fh, $path) or return 0;
-
- # attempt remove the file (does not work on some platforms)
- if (_can_unlink_opened_file()) {
-
- # return early (Without unlink) if we have been instructed to retain files.
- return 1 if $KEEP_ALL;
-
- # XXX: do *not* call this on a directory; possible race
- # resulting in recursive removal
- croak "unlink0: $path has become a directory!" if -d $path;
- unlink($path) or return 0;
-
- # Stat the filehandle
- my @fh = stat $fh;
-
- print "Link count = $fh[3] \n" if $DEBUG;
-
- # Make sure that the link count is zero
- # - Cygwin provides deferred unlinking, however,
- # on Win9x the link count remains 1
- # On NFS the link count may still be 1 but we can't know that
- # we are on NFS. Since we can't be sure, we'll defer it
-
- return 1 if $fh[3] == 0 || $^O eq 'cygwin';
- }
- # fall-through if we can't unlink now
- _deferred_unlink($fh, $path, 0);
- return 1;
-}
-
-sub cmpstat {
-
- croak 'Usage: cmpstat(filehandle, filename)'
- unless scalar(@_) == 2;
-
- # Read args
- my ($fh, $path) = @_;
-
- warn "Comparing stat\n"
- if $DEBUG;
-
- # Stat the filehandle - which may be closed if someone has manually
- # closed the file. Can not turn off warnings without using $^W
- # unless we upgrade to 5.006 minimum requirement
- my @fh;
- {
- local ($^W) = 0;
- @fh = stat $fh;
- }
- return unless @fh;
-
- if ($fh[3] > 1 && $^W) {
- carp "unlink0: fstat found too many links; SB=@fh" if $^W;
- }
-
- # Stat the path
- my @path = stat $path;
-
- unless (@path) {
- carp "unlink0: $path is gone already" if $^W;
- return;
- }
-
- # this is no longer a file, but may be a directory, or worse
- unless (-f $path) {
- confess "panic: $path is no longer a file: SB=@fh";
- }
-
- # Do comparison of each member of the array
- # On WinNT dev and rdev seem to be different
- # depending on whether it is a file or a handle.
- # Cannot simply compare all members of the stat return
- # Select the ones we can use
- my @okstat = (0..$#fh); # Use all by default
- if ($^O eq 'MSWin32') {
- @okstat = (1,2,3,4,5,7,8,9,10);
- } elsif ($^O eq 'os2') {
- @okstat = (0, 2..$#fh);
- } elsif ($^O eq 'VMS') { # device and file ID are sufficient
- @okstat = (0, 1);
- } elsif ($^O eq 'dos') {
- @okstat = (0,2..7,11..$#fh);
- } elsif ($^O eq 'mpeix') {
- @okstat = (0..4,8..10);
- }
-
- # Now compare each entry explicitly by number
- for (@okstat) {
- print "Comparing: $_ : $fh[$_] and $path[$_]\n" if $DEBUG;
- # Use eq rather than == since rdev, blksize, and blocks (6, 11,
- # and 12) will be '' on platforms that do not support them. This
- # is fine since we are only comparing integers.
- unless ($fh[$_] eq $path[$_]) {
- warn "Did not match $_ element of stat\n" if $DEBUG;
- return 0;
- }
- }
-
- return 1;
-}
-
-sub unlink1 {
- croak 'Usage: unlink1(filehandle, filename)'
- unless scalar(@_) == 2;
-
- # Read args
- my ($fh, $path) = @_;
-
- cmpstat($fh, $path) or return 0;
-
- # Close the file
- close( $fh ) or return 0;
-
- # Make sure the file is writable (for windows)
- _force_writable( $path );
-
- # return early (without unlink) if we have been instructed to retain files.
- return 1 if $KEEP_ALL;
-
- # remove the file
- return unlink($path);
-}
-
-{
- # protect from using the variable itself
- my $LEVEL = STANDARD;
- sub safe_level {
- my $self = shift;
- if (@_) {
- my $level = shift;
- if (($level != STANDARD) && ($level != MEDIUM) && ($level != HIGH)) {
- carp "safe_level: Specified level ($level) not STANDARD, MEDIUM or HIGH - ignoring\n" if $^W;
- } else {
- # Don't allow this on perl 5.005 or earlier
- if ($] < 5.006 && $level != STANDARD) {
- # Cant do MEDIUM or HIGH checks
- croak "Currently requires perl 5.006 or newer to do the safe checks";
- }
- # Check that we are allowed to change level
- # Silently ignore if we can not.
- $LEVEL = $level if _can_do_level($level);
- }
- }
- return $LEVEL;
- }
-}
-
-{
- my $TopSystemUID = 10;
- $TopSystemUID = 197108 if $^O eq 'interix'; # "Administrator"
- sub top_system_uid {
- my $self = shift;
- if (@_) {
- my $newuid = shift;
- croak "top_system_uid: UIDs should be numeric"
- unless $newuid =~ /^\d+$/s;
- $TopSystemUID = $newuid;
- }
- return $TopSystemUID;
- }
-}
-
-package File::Temp::Dir;
-
-use File::Path qw/ rmtree /;
-use strict;
-use overload '""' => "STRINGIFY",
- '0+' => \&File::Temp::NUMIFY,
- fallback => 1;
-
-# private class specifically to support tempdir objects
-# created by File::Temp->newdir
-
-# ostensibly the same method interface as File::Temp but without
-# inheriting all the IO::Seekable methods and other cruft
-
-# Read-only - returns the name of the temp directory
-
-sub dirname {
- my $self = shift;
- return $self->{DIRNAME};
-}
-
-sub STRINGIFY {
- my $self = shift;
- return $self->dirname;
-}
-
-sub unlink_on_destroy {
- my $self = shift;
- if (@_) {
- $self->{CLEANUP} = shift;
- }
- return $self->{CLEANUP};
-}
-
-sub DESTROY {
- my $self = shift;
- local($., $@, $!, $^E, $?);
- if ($self->unlink_on_destroy &&
- $$ == $self->{LAUNCHPID} && !$File::Temp::KEEP_ALL) {
- if (-d $self->{REALNAME}) {
- # Some versions of rmtree will abort if you attempt to remove
- # the directory you are sitting in. We protect that and turn it
- # into a warning. We do this because this occurs during object
- # destruction and so can not be caught by the user.
- eval { rmtree($self->{REALNAME}, $File::Temp::DEBUG, 0); };
- warn $@ if ($@ && $^W);
- }
- }
-}
-
-1;
-
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/FileHandle.pm b/vendor/LeOS/tools-leos/common/perl-base/FileHandle.pm
deleted file mode 100644
index e474032e..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/FileHandle.pm
+++ /dev/null
@@ -1,105 +0,0 @@
-package FileHandle;
-
-use 5.006;
-use strict;
-our($VERSION, @ISA, @EXPORT, @EXPORT_OK);
-
-$VERSION = "2.03";
-
-require IO::File;
-@ISA = qw(IO::File);
-
-@EXPORT = qw(_IOFBF _IOLBF _IONBF);
-
-@EXPORT_OK = qw(
- pipe
-
- autoflush
- output_field_separator
- output_record_separator
- input_record_separator
- input_line_number
- format_page_number
- format_lines_per_page
- format_lines_left
- format_name
- format_top_name
- format_line_break_characters
- format_formfeed
-
- print
- printf
- getline
- getlines
-);
-
-#
-# Everything we're willing to export, we must first import.
-#
-IO::Handle->import( grep { !defined(&$_) } @EXPORT, @EXPORT_OK );
-
-#
-# Some people call "FileHandle::function", so all the functions
-# that were in the old FileHandle class must be imported, too.
-#
-{
- no strict 'refs';
-
- my %import = (
- 'IO::Handle' =>
- [qw(DESTROY new_from_fd fdopen close fileno getc ungetc gets
- eof flush error clearerr setbuf setvbuf _open_mode_string)],
- 'IO::Seekable' =>
- [qw(seek tell getpos setpos)],
- 'IO::File' =>
- [qw(new new_tmpfile open)]
- );
- for my $pkg (keys %import) {
- for my $func (@{$import{$pkg}}) {
- my $c = *{"${pkg}::$func"}{CODE}
- or die "${pkg}::$func missing";
- *$func = $c;
- }
- }
-}
-
-#
-# Specialized importer for Fcntl magic.
-#
-sub import {
- my $pkg = shift;
- my $callpkg = caller;
- require Exporter;
- Exporter::export($pkg, $callpkg, @_);
-
- #
- # If the Fcntl extension is available,
- # export its constants.
- #
- eval {
- require Fcntl;
- Exporter::export('Fcntl', $callpkg);
- };
-}
-
-################################################
-# This is the only exported function we define;
-# the rest come from other classes.
-#
-
-sub pipe {
- my $r = IO::Handle->new;
- my $w = IO::Handle->new;
- CORE::pipe($r, $w) or return undef;
- ($r, $w);
-}
-
-# Rebless standard file handles
-bless *STDIN{IO}, "FileHandle" if ref *STDIN{IO} eq "IO::Handle";
-bless *STDOUT{IO}, "FileHandle" if ref *STDOUT{IO} eq "IO::Handle";
-bless *STDERR{IO}, "FileHandle" if ref *STDERR{IO} eq "IO::Handle";
-
-1;
-
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Getopt/Long.pm b/vendor/LeOS/tools-leos/common/perl-base/Getopt/Long.pm
deleted file mode 100644
index 8542aafb..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Getopt/Long.pm
+++ /dev/null
@@ -1,1572 +0,0 @@
-#! perl
-
-# Getopt::Long.pm -- Universal options parsing
-# Author : Johan Vromans
-# Created On : Tue Sep 11 15:00:12 1990
-# Last Modified By: Johan Vromans
-# Last Modified On: Thu Jun 9 14:50:37 2016
-# Update Count : 1699
-# Status : Released
-
-################ Module Preamble ################
-
-package Getopt::Long;
-
-use 5.004;
-
-use strict;
-
-use vars qw($VERSION);
-$VERSION = 2.49;
-# For testing versions only.
-use vars qw($VERSION_STRING);
-$VERSION_STRING = "2.49";
-
-use Exporter;
-use vars qw(@ISA @EXPORT @EXPORT_OK);
-@ISA = qw(Exporter);
-
-# Exported subroutines.
-sub GetOptions(@); # always
-sub GetOptionsFromArray(@); # on demand
-sub GetOptionsFromString(@); # on demand
-sub Configure(@); # on demand
-sub HelpMessage(@); # on demand
-sub VersionMessage(@); # in demand
-
-BEGIN {
- # Init immediately so their contents can be used in the 'use vars' below.
- @EXPORT = qw(&GetOptions $REQUIRE_ORDER $PERMUTE $RETURN_IN_ORDER);
- @EXPORT_OK = qw(&HelpMessage &VersionMessage &Configure
- &GetOptionsFromArray &GetOptionsFromString);
-}
-
-# User visible variables.
-use vars @EXPORT, @EXPORT_OK;
-use vars qw($error $debug $major_version $minor_version);
-# Deprecated visible variables.
-use vars qw($autoabbrev $getopt_compat $ignorecase $bundling $order
- $passthrough);
-# Official invisible variables.
-use vars qw($genprefix $caller $gnu_compat $auto_help $auto_version $longprefix);
-
-# Really invisible variables.
-my $bundling_values;
-
-# Public subroutines.
-sub config(@); # deprecated name
-
-# Private subroutines.
-sub ConfigDefaults();
-sub ParseOptionSpec($$);
-sub OptCtl($);
-sub FindOption($$$$$);
-sub ValidValue ($$$$$);
-
-################ Local Variables ################
-
-# $requested_version holds the version that was mentioned in the 'use'
-# or 'require', if any. It can be used to enable or disable specific
-# features.
-my $requested_version = 0;
-
-################ Resident subroutines ################
-
-sub ConfigDefaults() {
- # Handle POSIX compliancy.
- if ( defined $ENV{"POSIXLY_CORRECT"} ) {
- $genprefix = "(--|-)";
- $autoabbrev = 0; # no automatic abbrev of options
- $bundling = 0; # no bundling of single letter switches
- $getopt_compat = 0; # disallow '+' to start options
- $order = $REQUIRE_ORDER;
- }
- else {
- $genprefix = "(--|-|\\+)";
- $autoabbrev = 1; # automatic abbrev of options
- $bundling = 0; # bundling off by default
- $getopt_compat = 1; # allow '+' to start options
- $order = $PERMUTE;
- }
- # Other configurable settings.
- $debug = 0; # for debugging
- $error = 0; # error tally
- $ignorecase = 1; # ignore case when matching options
- $passthrough = 0; # leave unrecognized options alone
- $gnu_compat = 0; # require --opt=val if value is optional
- $longprefix = "(--)"; # what does a long prefix look like
- $bundling_values = 0; # no bundling of values
-}
-
-# Override import.
-sub import {
- my $pkg = shift; # package
- my @syms = (); # symbols to import
- my @config = (); # configuration
- my $dest = \@syms; # symbols first
- for ( @_ ) {
- if ( $_ eq ':config' ) {
- $dest = \@config; # config next
- next;
- }
- push(@$dest, $_); # push
- }
- # Hide one level and call super.
- local $Exporter::ExportLevel = 1;
- push(@syms, qw(&GetOptions)) if @syms; # always export GetOptions
- $requested_version = 0;
- $pkg->SUPER::import(@syms);
- # And configure.
- Configure(@config) if @config;
-}
-
-################ Initialization ################
-
-# Values for $order. See GNU getopt.c for details.
-($REQUIRE_ORDER, $PERMUTE, $RETURN_IN_ORDER) = (0..2);
-# Version major/minor numbers.
-($major_version, $minor_version) = $VERSION =~ /^(\d+)\.(\d+)/;
-
-ConfigDefaults();
-
-################ OO Interface ################
-
-package Getopt::Long::Parser;
-
-# Store a copy of the default configuration. Since ConfigDefaults has
-# just been called, what we get from Configure is the default.
-my $default_config = do {
- Getopt::Long::Configure ()
-};
-
-sub new {
- my $that = shift;
- my $class = ref($that) || $that;
- my %atts = @_;
-
- # Register the callers package.
- my $self = { caller_pkg => (caller)[0] };
-
- bless ($self, $class);
-
- # Process config attributes.
- if ( defined $atts{config} ) {
- my $save = Getopt::Long::Configure ($default_config, @{$atts{config}});
- $self->{settings} = Getopt::Long::Configure ($save);
- delete ($atts{config});
- }
- # Else use default config.
- else {
- $self->{settings} = $default_config;
- }
-
- if ( %atts ) { # Oops
- die(__PACKAGE__.": unhandled attributes: ".
- join(" ", sort(keys(%atts)))."\n");
- }
-
- $self;
-}
-
-sub configure {
- my ($self) = shift;
-
- # Restore settings, merge new settings in.
- my $save = Getopt::Long::Configure ($self->{settings}, @_);
-
- # Restore orig config and save the new config.
- $self->{settings} = Getopt::Long::Configure ($save);
-}
-
-sub getoptions {
- my ($self) = shift;
-
- return $self->getoptionsfromarray(\@ARGV, @_);
-}
-
-sub getoptionsfromarray {
- my ($self) = shift;
-
- # Restore config settings.
- my $save = Getopt::Long::Configure ($self->{settings});
-
- # Call main routine.
- my $ret = 0;
- $Getopt::Long::caller = $self->{caller_pkg};
-
- eval {
- # Locally set exception handler to default, otherwise it will
- # be called implicitly here, and again explicitly when we try
- # to deliver the messages.
- local ($SIG{__DIE__}) = 'DEFAULT';
- $ret = Getopt::Long::GetOptionsFromArray (@_);
- };
-
- # Restore saved settings.
- Getopt::Long::Configure ($save);
-
- # Handle errors and return value.
- die ($@) if $@;
- return $ret;
-}
-
-package Getopt::Long;
-
-################ Back to Normal ################
-
-# Indices in option control info.
-# Note that ParseOptions uses the fields directly. Search for 'hard-wired'.
-use constant CTL_TYPE => 0;
-#use constant CTL_TYPE_FLAG => '';
-#use constant CTL_TYPE_NEG => '!';
-#use constant CTL_TYPE_INCR => '+';
-#use constant CTL_TYPE_INT => 'i';
-#use constant CTL_TYPE_INTINC => 'I';
-#use constant CTL_TYPE_XINT => 'o';
-#use constant CTL_TYPE_FLOAT => 'f';
-#use constant CTL_TYPE_STRING => 's';
-
-use constant CTL_CNAME => 1;
-
-use constant CTL_DEFAULT => 2;
-
-use constant CTL_DEST => 3;
- use constant CTL_DEST_SCALAR => 0;
- use constant CTL_DEST_ARRAY => 1;
- use constant CTL_DEST_HASH => 2;
- use constant CTL_DEST_CODE => 3;
-
-use constant CTL_AMIN => 4;
-use constant CTL_AMAX => 5;
-
-# FFU.
-#use constant CTL_RANGE => ;
-#use constant CTL_REPEAT => ;
-
-# Rather liberal patterns to match numbers.
-use constant PAT_INT => "[-+]?_*[0-9][0-9_]*";
-use constant PAT_XINT =>
- "(?:".
- "[-+]?_*[1-9][0-9_]*".
- "|".
- "0x_*[0-9a-f][0-9a-f_]*".
- "|".
- "0b_*[01][01_]*".
- "|".
- "0[0-7_]*".
- ")";
-use constant PAT_FLOAT =>
- "[-+]?". # optional sign
- "(?=[0-9.])". # must start with digit or dec.point
- "[0-9_]*". # digits before the dec.point
- "(\.[0-9_]+)?". # optional fraction
- "([eE][-+]?[0-9_]+)?"; # optional exponent
-
-sub GetOptions(@) {
- # Shift in default array.
- unshift(@_, \@ARGV);
- # Try to keep caller() and Carp consistent.
- goto &GetOptionsFromArray;
-}
-
-sub GetOptionsFromString(@) {
- my ($string) = shift;
- require Text::ParseWords;
- my $args = [ Text::ParseWords::shellwords($string) ];
- $caller ||= (caller)[0]; # current context
- my $ret = GetOptionsFromArray($args, @_);
- return ( $ret, $args ) if wantarray;
- if ( @$args ) {
- $ret = 0;
- warn("GetOptionsFromString: Excess data \"@$args\" in string \"$string\"\n");
- }
- $ret;
-}
-
-sub GetOptionsFromArray(@) {
-
- my ($argv, @optionlist) = @_; # local copy of the option descriptions
- my $argend = '--'; # option list terminator
- my %opctl = (); # table of option specs
- my $pkg = $caller || (caller)[0]; # current context
- # Needed if linkage is omitted.
- my @ret = (); # accum for non-options
- my %linkage; # linkage
- my $userlinkage; # user supplied HASH
- my $opt; # current option
- my $prefix = $genprefix; # current prefix
-
- $error = '';
-
- if ( $debug ) {
- # Avoid some warnings if debugging.
- local ($^W) = 0;
- print STDERR
- ("Getopt::Long $Getopt::Long::VERSION ",
- "called from package \"$pkg\".",
- "\n ",
- "argv: ",
- defined($argv)
- ? UNIVERSAL::isa( $argv, 'ARRAY' ) ? "(@$argv)" : $argv
- : "",
- "\n ",
- "autoabbrev=$autoabbrev,".
- "bundling=$bundling,",
- "bundling_values=$bundling_values,",
- "getopt_compat=$getopt_compat,",
- "gnu_compat=$gnu_compat,",
- "order=$order,",
- "\n ",
- "ignorecase=$ignorecase,",
- "requested_version=$requested_version,",
- "passthrough=$passthrough,",
- "genprefix=\"$genprefix\",",
- "longprefix=\"$longprefix\".",
- "\n");
- }
-
- # Check for ref HASH as first argument.
- # First argument may be an object. It's OK to use this as long
- # as it is really a hash underneath.
- $userlinkage = undef;
- if ( @optionlist && ref($optionlist[0]) and
- UNIVERSAL::isa($optionlist[0],'HASH') ) {
- $userlinkage = shift (@optionlist);
- print STDERR ("=> user linkage: $userlinkage\n") if $debug;
- }
-
- # See if the first element of the optionlist contains option
- # starter characters.
- # Be careful not to interpret '<>' as option starters.
- if ( @optionlist && $optionlist[0] =~ /^\W+$/
- && !($optionlist[0] eq '<>'
- && @optionlist > 0
- && ref($optionlist[1])) ) {
- $prefix = shift (@optionlist);
- # Turn into regexp. Needs to be parenthesized!
- $prefix =~ s/(\W)/\\$1/g;
- $prefix = "([" . $prefix . "])";
- print STDERR ("=> prefix=\"$prefix\"\n") if $debug;
- }
-
- # Verify correctness of optionlist.
- %opctl = ();
- while ( @optionlist ) {
- my $opt = shift (@optionlist);
-
- unless ( defined($opt) ) {
- $error .= "Undefined argument in option spec\n";
- next;
- }
-
- # Strip leading prefix so people can specify "--foo=i" if they like.
- $opt = $+ if $opt =~ /^$prefix+(.*)$/s;
-
- if ( $opt eq '<>' ) {
- if ( (defined $userlinkage)
- && !(@optionlist > 0 && ref($optionlist[0]))
- && (exists $userlinkage->{$opt})
- && ref($userlinkage->{$opt}) ) {
- unshift (@optionlist, $userlinkage->{$opt});
- }
- unless ( @optionlist > 0
- && ref($optionlist[0]) && ref($optionlist[0]) eq 'CODE' ) {
- $error .= "Option spec <> requires a reference to a subroutine\n";
- # Kill the linkage (to avoid another error).
- shift (@optionlist)
- if @optionlist && ref($optionlist[0]);
- next;
- }
- $linkage{'<>'} = shift (@optionlist);
- next;
- }
-
- # Parse option spec.
- my ($name, $orig) = ParseOptionSpec ($opt, \%opctl);
- unless ( defined $name ) {
- # Failed. $orig contains the error message. Sorry for the abuse.
- $error .= $orig;
- # Kill the linkage (to avoid another error).
- shift (@optionlist)
- if @optionlist && ref($optionlist[0]);
- next;
- }
-
- # If no linkage is supplied in the @optionlist, copy it from
- # the userlinkage if available.
- if ( defined $userlinkage ) {
- unless ( @optionlist > 0 && ref($optionlist[0]) ) {
- if ( exists $userlinkage->{$orig} &&
- ref($userlinkage->{$orig}) ) {
- print STDERR ("=> found userlinkage for \"$orig\": ",
- "$userlinkage->{$orig}\n")
- if $debug;
- unshift (@optionlist, $userlinkage->{$orig});
- }
- else {
- # Do nothing. Being undefined will be handled later.
- next;
- }
- }
- }
-
- # Copy the linkage. If omitted, link to global variable.
- if ( @optionlist > 0 && ref($optionlist[0]) ) {
- print STDERR ("=> link \"$orig\" to $optionlist[0]\n")
- if $debug;
- my $rl = ref($linkage{$orig} = shift (@optionlist));
-
- if ( $rl eq "ARRAY" ) {
- $opctl{$name}[CTL_DEST] = CTL_DEST_ARRAY;
- }
- elsif ( $rl eq "HASH" ) {
- $opctl{$name}[CTL_DEST] = CTL_DEST_HASH;
- }
- elsif ( $rl eq "SCALAR" || $rl eq "REF" ) {
-# if ( $opctl{$name}[CTL_DEST] == CTL_DEST_ARRAY ) {
-# my $t = $linkage{$orig};
-# $$t = $linkage{$orig} = [];
-# }
-# elsif ( $opctl{$name}[CTL_DEST] == CTL_DEST_HASH ) {
-# }
-# else {
- # Ok.
-# }
- }
- elsif ( $rl eq "CODE" ) {
- # Ok.
- }
- else {
- $error .= "Invalid option linkage for \"$opt\"\n";
- }
- }
- else {
- # Link to global $opt_XXX variable.
- # Make sure a valid perl identifier results.
- my $ov = $orig;
- $ov =~ s/\W/_/g;
- if ( $opctl{$name}[CTL_DEST] == CTL_DEST_ARRAY ) {
- print STDERR ("=> link \"$orig\" to \@$pkg","::opt_$ov\n")
- if $debug;
- eval ("\$linkage{\$orig} = \\\@".$pkg."::opt_$ov;");
- }
- elsif ( $opctl{$name}[CTL_DEST] == CTL_DEST_HASH ) {
- print STDERR ("=> link \"$orig\" to \%$pkg","::opt_$ov\n")
- if $debug;
- eval ("\$linkage{\$orig} = \\\%".$pkg."::opt_$ov;");
- }
- else {
- print STDERR ("=> link \"$orig\" to \$$pkg","::opt_$ov\n")
- if $debug;
- eval ("\$linkage{\$orig} = \\\$".$pkg."::opt_$ov;");
- }
- }
-
- if ( $opctl{$name}[CTL_TYPE] eq 'I'
- && ( $opctl{$name}[CTL_DEST] == CTL_DEST_ARRAY
- || $opctl{$name}[CTL_DEST] == CTL_DEST_HASH )
- ) {
- $error .= "Invalid option linkage for \"$opt\"\n";
- }
-
- }
-
- $error .= "GetOptionsFromArray: 1st parameter is not an array reference\n"
- unless $argv && UNIVERSAL::isa( $argv, 'ARRAY' );
-
- # Bail out if errors found.
- die ($error) if $error;
- $error = 0;
-
- # Supply --version and --help support, if needed and allowed.
- if ( defined($auto_version) ? $auto_version : ($requested_version >= 2.3203) ) {
- if ( !defined($opctl{version}) ) {
- $opctl{version} = ['','version',0,CTL_DEST_CODE,undef];
- $linkage{version} = \&VersionMessage;
- }
- $auto_version = 1;
- }
- if ( defined($auto_help) ? $auto_help : ($requested_version >= 2.3203) ) {
- if ( !defined($opctl{help}) && !defined($opctl{'?'}) ) {
- $opctl{help} = $opctl{'?'} = ['','help',0,CTL_DEST_CODE,undef];
- $linkage{help} = \&HelpMessage;
- }
- $auto_help = 1;
- }
-
- # Show the options tables if debugging.
- if ( $debug ) {
- my ($arrow, $k, $v);
- $arrow = "=> ";
- while ( ($k,$v) = each(%opctl) ) {
- print STDERR ($arrow, "\$opctl{$k} = $v ", OptCtl($v), "\n");
- $arrow = " ";
- }
- }
-
- # Process argument list
- my $goon = 1;
- while ( $goon && @$argv > 0 ) {
-
- # Get next argument.
- $opt = shift (@$argv);
- print STDERR ("=> arg \"", $opt, "\"\n") if $debug;
-
- # Double dash is option list terminator.
- if ( defined($opt) && $opt eq $argend ) {
- push (@ret, $argend) if $passthrough;
- last;
- }
-
- # Look it up.
- my $tryopt = $opt;
- my $found; # success status
- my $key; # key (if hash type)
- my $arg; # option argument
- my $ctl; # the opctl entry
-
- ($found, $opt, $ctl, $arg, $key) =
- FindOption ($argv, $prefix, $argend, $opt, \%opctl);
-
- if ( $found ) {
-
- # FindOption undefines $opt in case of errors.
- next unless defined $opt;
-
- my $argcnt = 0;
- while ( defined $arg ) {
-
- # Get the canonical name.
- print STDERR ("=> cname for \"$opt\" is ") if $debug;
- $opt = $ctl->[CTL_CNAME];
- print STDERR ("\"$ctl->[CTL_CNAME]\"\n") if $debug;
-
- if ( defined $linkage{$opt} ) {
- print STDERR ("=> ref(\$L{$opt}) -> ",
- ref($linkage{$opt}), "\n") if $debug;
-
- if ( ref($linkage{$opt}) eq 'SCALAR'
- || ref($linkage{$opt}) eq 'REF' ) {
- if ( $ctl->[CTL_TYPE] eq '+' ) {
- print STDERR ("=> \$\$L{$opt} += \"$arg\"\n")
- if $debug;
- if ( defined ${$linkage{$opt}} ) {
- ${$linkage{$opt}} += $arg;
- }
- else {
- ${$linkage{$opt}} = $arg;
- }
- }
- elsif ( $ctl->[CTL_DEST] == CTL_DEST_ARRAY ) {
- print STDERR ("=> ref(\$L{$opt}) auto-vivified",
- " to ARRAY\n")
- if $debug;
- my $t = $linkage{$opt};
- $$t = $linkage{$opt} = [];
- print STDERR ("=> push(\@{\$L{$opt}, \"$arg\")\n")
- if $debug;
- push (@{$linkage{$opt}}, $arg);
- }
- elsif ( $ctl->[CTL_DEST] == CTL_DEST_HASH ) {
- print STDERR ("=> ref(\$L{$opt}) auto-vivified",
- " to HASH\n")
- if $debug;
- my $t = $linkage{$opt};
- $$t = $linkage{$opt} = {};
- print STDERR ("=> \$\$L{$opt}->{$key} = \"$arg\"\n")
- if $debug;
- $linkage{$opt}->{$key} = $arg;
- }
- else {
- print STDERR ("=> \$\$L{$opt} = \"$arg\"\n")
- if $debug;
- ${$linkage{$opt}} = $arg;
- }
- }
- elsif ( ref($linkage{$opt}) eq 'ARRAY' ) {
- print STDERR ("=> push(\@{\$L{$opt}, \"$arg\")\n")
- if $debug;
- push (@{$linkage{$opt}}, $arg);
- }
- elsif ( ref($linkage{$opt}) eq 'HASH' ) {
- print STDERR ("=> \$\$L{$opt}->{$key} = \"$arg\"\n")
- if $debug;
- $linkage{$opt}->{$key} = $arg;
- }
- elsif ( ref($linkage{$opt}) eq 'CODE' ) {
- print STDERR ("=> &L{$opt}(\"$opt\"",
- $ctl->[CTL_DEST] == CTL_DEST_HASH ? ", \"$key\"" : "",
- ", \"$arg\")\n")
- if $debug;
- my $eval_error = do {
- local $@;
- local $SIG{__DIE__} = 'DEFAULT';
- eval {
- &{$linkage{$opt}}
- (Getopt::Long::CallBack->new
- (name => $opt,
- ctl => $ctl,
- opctl => \%opctl,
- linkage => \%linkage,
- prefix => $prefix,
- ),
- $ctl->[CTL_DEST] == CTL_DEST_HASH ? ($key) : (),
- $arg);
- };
- $@;
- };
- print STDERR ("=> die($eval_error)\n")
- if $debug && $eval_error ne '';
- if ( $eval_error =~ /^!/ ) {
- if ( $eval_error =~ /^!FINISH\b/ ) {
- $goon = 0;
- }
- }
- elsif ( $eval_error ne '' ) {
- warn ($eval_error);
- $error++;
- }
- }
- else {
- print STDERR ("Invalid REF type \"", ref($linkage{$opt}),
- "\" in linkage\n");
- die("Getopt::Long -- internal error!\n");
- }
- }
- # No entry in linkage means entry in userlinkage.
- elsif ( $ctl->[CTL_DEST] == CTL_DEST_ARRAY ) {
- if ( defined $userlinkage->{$opt} ) {
- print STDERR ("=> push(\@{\$L{$opt}}, \"$arg\")\n")
- if $debug;
- push (@{$userlinkage->{$opt}}, $arg);
- }
- else {
- print STDERR ("=>\$L{$opt} = [\"$arg\"]\n")
- if $debug;
- $userlinkage->{$opt} = [$arg];
- }
- }
- elsif ( $ctl->[CTL_DEST] == CTL_DEST_HASH ) {
- if ( defined $userlinkage->{$opt} ) {
- print STDERR ("=> \$L{$opt}->{$key} = \"$arg\"\n")
- if $debug;
- $userlinkage->{$opt}->{$key} = $arg;
- }
- else {
- print STDERR ("=>\$L{$opt} = {$key => \"$arg\"}\n")
- if $debug;
- $userlinkage->{$opt} = {$key => $arg};
- }
- }
- else {
- if ( $ctl->[CTL_TYPE] eq '+' ) {
- print STDERR ("=> \$L{$opt} += \"$arg\"\n")
- if $debug;
- if ( defined $userlinkage->{$opt} ) {
- $userlinkage->{$opt} += $arg;
- }
- else {
- $userlinkage->{$opt} = $arg;
- }
- }
- else {
- print STDERR ("=>\$L{$opt} = \"$arg\"\n") if $debug;
- $userlinkage->{$opt} = $arg;
- }
- }
-
- $argcnt++;
- last if $argcnt >= $ctl->[CTL_AMAX] && $ctl->[CTL_AMAX] != -1;
- undef($arg);
-
- # Need more args?
- if ( $argcnt < $ctl->[CTL_AMIN] ) {
- if ( @$argv ) {
- if ( ValidValue($ctl, $argv->[0], 1, $argend, $prefix) ) {
- $arg = shift(@$argv);
- if ( $ctl->[CTL_TYPE] =~ /^[iIo]$/ ) {
- $arg =~ tr/_//d;
- $arg = $ctl->[CTL_TYPE] eq 'o' && $arg =~ /^0/
- ? oct($arg)
- : 0+$arg
- }
- ($key,$arg) = $arg =~ /^([^=]+)=(.*)/
- if $ctl->[CTL_DEST] == CTL_DEST_HASH;
- next;
- }
- warn("Value \"$$argv[0]\" invalid for option $opt\n");
- $error++;
- }
- else {
- warn("Insufficient arguments for option $opt\n");
- $error++;
- }
- }
-
- # Any more args?
- if ( @$argv && ValidValue($ctl, $argv->[0], 0, $argend, $prefix) ) {
- $arg = shift(@$argv);
- if ( $ctl->[CTL_TYPE] =~ /^[iIo]$/ ) {
- $arg =~ tr/_//d;
- $arg = $ctl->[CTL_TYPE] eq 'o' && $arg =~ /^0/
- ? oct($arg)
- : 0+$arg
- }
- ($key,$arg) = $arg =~ /^([^=]+)=(.*)/
- if $ctl->[CTL_DEST] == CTL_DEST_HASH;
- next;
- }
- }
- }
-
- # Not an option. Save it if we $PERMUTE and don't have a <>.
- elsif ( $order == $PERMUTE ) {
- # Try non-options call-back.
- my $cb;
- if ( defined ($cb = $linkage{'<>'}) ) {
- print STDERR ("=> &L{$tryopt}(\"$tryopt\")\n")
- if $debug;
- my $eval_error = do {
- local $@;
- local $SIG{__DIE__} = 'DEFAULT';
- eval {
- # The arg to <> cannot be the CallBack object
- # since it may be passed to other modules that
- # get confused (e.g., Archive::Tar). Well,
- # it's not relevant for this callback anyway.
- &$cb($tryopt);
- };
- $@;
- };
- print STDERR ("=> die($eval_error)\n")
- if $debug && $eval_error ne '';
- if ( $eval_error =~ /^!/ ) {
- if ( $eval_error =~ /^!FINISH\b/ ) {
- $goon = 0;
- }
- }
- elsif ( $eval_error ne '' ) {
- warn ($eval_error);
- $error++;
- }
- }
- else {
- print STDERR ("=> saving \"$tryopt\" ",
- "(not an option, may permute)\n") if $debug;
- push (@ret, $tryopt);
- }
- next;
- }
-
- # ...otherwise, terminate.
- else {
- # Push this one back and exit.
- unshift (@$argv, $tryopt);
- return ($error == 0);
- }
-
- }
-
- # Finish.
- if ( @ret && $order == $PERMUTE ) {
- # Push back accumulated arguments
- print STDERR ("=> restoring \"", join('" "', @ret), "\"\n")
- if $debug;
- unshift (@$argv, @ret);
- }
-
- return ($error == 0);
-}
-
-# A readable representation of what's in an optbl.
-sub OptCtl ($) {
- my ($v) = @_;
- my @v = map { defined($_) ? ($_) : ("") } @$v;
- "[".
- join(",",
- "\"$v[CTL_TYPE]\"",
- "\"$v[CTL_CNAME]\"",
- "\"$v[CTL_DEFAULT]\"",
- ("\$","\@","\%","\&")[$v[CTL_DEST] || 0],
- $v[CTL_AMIN] || '',
- $v[CTL_AMAX] || '',
-# $v[CTL_RANGE] || '',
-# $v[CTL_REPEAT] || '',
- ). "]";
-}
-
-# Parse an option specification and fill the tables.
-sub ParseOptionSpec ($$) {
- my ($opt, $opctl) = @_;
-
- # Match option spec.
- if ( $opt !~ m;^
- (
- # Option name
- (?: \w+[-\w]* )
- # Alias names, or "?"
- (?: \| (?: \? | \w[-\w]* ) )*
- # Aliases
- (?: \| (?: [^-|!+=:][^|!+=:]* )? )*
- )?
- (
- # Either modifiers ...
- [!+]
- |
- # ... or a value/dest/repeat specification
- [=:] [ionfs] [@%]? (?: \{\d*,?\d*\} )?
- |
- # ... or an optional-with-default spec
- : (?: -?\d+ | \+ ) [@%]?
- )?
- $;x ) {
- return (undef, "Error in option spec: \"$opt\"\n");
- }
-
- my ($names, $spec) = ($1, $2);
- $spec = '' unless defined $spec;
-
- # $orig keeps track of the primary name the user specified.
- # This name will be used for the internal or external linkage.
- # In other words, if the user specifies "FoO|BaR", it will
- # match any case combinations of 'foo' and 'bar', but if a global
- # variable needs to be set, it will be $opt_FoO in the exact case
- # as specified.
- my $orig;
-
- my @names;
- if ( defined $names ) {
- @names = split (/\|/, $names);
- $orig = $names[0];
- }
- else {
- @names = ('');
- $orig = '';
- }
-
- # Construct the opctl entries.
- my $entry;
- if ( $spec eq '' || $spec eq '+' || $spec eq '!' ) {
- # Fields are hard-wired here.
- $entry = [$spec,$orig,undef,CTL_DEST_SCALAR,0,0];
- }
- elsif ( $spec =~ /^:(-?\d+|\+)([@%])?$/ ) {
- my $def = $1;
- my $dest = $2;
- my $type = $def eq '+' ? 'I' : 'i';
- $dest ||= '$';
- $dest = $dest eq '@' ? CTL_DEST_ARRAY
- : $dest eq '%' ? CTL_DEST_HASH : CTL_DEST_SCALAR;
- # Fields are hard-wired here.
- $entry = [$type,$orig,$def eq '+' ? undef : $def,
- $dest,0,1];
- }
- else {
- my ($mand, $type, $dest) =
- $spec =~ /^([=:])([ionfs])([@%])?(\{(\d+)?(,)?(\d+)?\})?$/;
- return (undef, "Cannot repeat while bundling: \"$opt\"\n")
- if $bundling && defined($4);
- my ($mi, $cm, $ma) = ($5, $6, $7);
- return (undef, "{0} is useless in option spec: \"$opt\"\n")
- if defined($mi) && !$mi && !defined($ma) && !defined($cm);
-
- $type = 'i' if $type eq 'n';
- $dest ||= '$';
- $dest = $dest eq '@' ? CTL_DEST_ARRAY
- : $dest eq '%' ? CTL_DEST_HASH : CTL_DEST_SCALAR;
- # Default minargs to 1/0 depending on mand status.
- $mi = $mand eq '=' ? 1 : 0 unless defined $mi;
- # Adjust mand status according to minargs.
- $mand = $mi ? '=' : ':';
- # Adjust maxargs.
- $ma = $mi ? $mi : 1 unless defined $ma || defined $cm;
- return (undef, "Max must be greater than zero in option spec: \"$opt\"\n")
- if defined($ma) && !$ma;
- return (undef, "Max less than min in option spec: \"$opt\"\n")
- if defined($ma) && $ma < $mi;
-
- # Fields are hard-wired here.
- $entry = [$type,$orig,undef,$dest,$mi,$ma||-1];
- }
-
- # Process all names. First is canonical, the rest are aliases.
- my $dups = '';
- foreach ( @names ) {
-
- $_ = lc ($_)
- if $ignorecase > (($bundling && length($_) == 1) ? 1 : 0);
-
- if ( exists $opctl->{$_} ) {
- $dups .= "Duplicate specification \"$opt\" for option \"$_\"\n";
- }
-
- if ( $spec eq '!' ) {
- $opctl->{"no$_"} = $entry;
- $opctl->{"no-$_"} = $entry;
- $opctl->{$_} = [@$entry];
- $opctl->{$_}->[CTL_TYPE] = '';
- }
- else {
- $opctl->{$_} = $entry;
- }
- }
-
- if ( $dups && $^W ) {
- foreach ( split(/\n+/, $dups) ) {
- warn($_."\n");
- }
- }
- ($names[0], $orig);
-}
-
-# Option lookup.
-sub FindOption ($$$$$) {
-
- # returns (1, $opt, $ctl, $arg, $key) if okay,
- # returns (1, undef) if option in error,
- # returns (0) otherwise.
-
- my ($argv, $prefix, $argend, $opt, $opctl) = @_;
-
- print STDERR ("=> find \"$opt\"\n") if $debug;
-
- return (0) unless defined($opt);
- return (0) unless $opt =~ /^($prefix)(.*)$/s;
- return (0) if $opt eq "-" && !defined $opctl->{''};
-
- $opt = substr( $opt, length($1) ); # retain taintedness
- my $starter = $1;
-
- print STDERR ("=> split \"$starter\"+\"$opt\"\n") if $debug;
-
- my $optarg; # value supplied with --opt=value
- my $rest; # remainder from unbundling
-
- # If it is a long option, it may include the value.
- # With getopt_compat, only if not bundling.
- if ( ($starter=~/^$longprefix$/
- || ($getopt_compat && ($bundling == 0 || $bundling == 2)))
- && (my $oppos = index($opt, '=', 1)) > 0) {
- my $optorg = $opt;
- $opt = substr($optorg, 0, $oppos);
- $optarg = substr($optorg, $oppos + 1); # retain tainedness
- print STDERR ("=> option \"", $opt,
- "\", optarg = \"$optarg\"\n") if $debug;
- }
-
- #### Look it up ###
-
- my $tryopt = $opt; # option to try
-
- if ( ( $bundling || $bundling_values ) && $starter eq '-' ) {
-
- # To try overrides, obey case ignore.
- $tryopt = $ignorecase ? lc($opt) : $opt;
-
- # If bundling == 2, long options can override bundles.
- if ( $bundling == 2 && length($tryopt) > 1
- && defined ($opctl->{$tryopt}) ) {
- print STDERR ("=> $starter$tryopt overrides unbundling\n")
- if $debug;
- }
-
- # If bundling_values, option may be followed by the value.
- elsif ( $bundling_values ) {
- $tryopt = $opt;
- # Unbundle single letter option.
- $rest = length ($tryopt) > 0 ? substr ($tryopt, 1) : '';
- $tryopt = substr ($tryopt, 0, 1);
- $tryopt = lc ($tryopt) if $ignorecase > 1;
- print STDERR ("=> $starter$tryopt unbundled from ",
- "$starter$tryopt$rest\n") if $debug;
- # Whatever remains may not be considered an option.
- $optarg = $rest eq '' ? undef : $rest;
- $rest = undef;
- }
-
- # Split off a single letter and leave the rest for
- # further processing.
- else {
- $tryopt = $opt;
- # Unbundle single letter option.
- $rest = length ($tryopt) > 0 ? substr ($tryopt, 1) : '';
- $tryopt = substr ($tryopt, 0, 1);
- $tryopt = lc ($tryopt) if $ignorecase > 1;
- print STDERR ("=> $starter$tryopt unbundled from ",
- "$starter$tryopt$rest\n") if $debug;
- $rest = undef unless $rest ne '';
- }
- }
-
- # Try auto-abbreviation.
- elsif ( $autoabbrev && $opt ne "" ) {
- # Sort the possible long option names.
- my @names = sort(keys (%$opctl));
- # Downcase if allowed.
- $opt = lc ($opt) if $ignorecase;
- $tryopt = $opt;
- # Turn option name into pattern.
- my $pat = quotemeta ($opt);
- # Look up in option names.
- my @hits = grep (/^$pat/, @names);
- print STDERR ("=> ", scalar(@hits), " hits (@hits) with \"$pat\" ",
- "out of ", scalar(@names), "\n") if $debug;
-
- # Check for ambiguous results.
- unless ( (@hits <= 1) || (grep ($_ eq $opt, @hits) == 1) ) {
- # See if all matches are for the same option.
- my %hit;
- foreach ( @hits ) {
- my $hit = $opctl->{$_}->[CTL_CNAME]
- if defined $opctl->{$_}->[CTL_CNAME];
- $hit = "no" . $hit if $opctl->{$_}->[CTL_TYPE] eq '!';
- $hit{$hit} = 1;
- }
- # Remove auto-supplied options (version, help).
- if ( keys(%hit) == 2 ) {
- if ( $auto_version && exists($hit{version}) ) {
- delete $hit{version};
- }
- elsif ( $auto_help && exists($hit{help}) ) {
- delete $hit{help};
- }
- }
- # Now see if it really is ambiguous.
- unless ( keys(%hit) == 1 ) {
- return (0) if $passthrough;
- warn ("Option ", $opt, " is ambiguous (",
- join(", ", @hits), ")\n");
- $error++;
- return (1, undef);
- }
- @hits = keys(%hit);
- }
-
- # Complete the option name, if appropriate.
- if ( @hits == 1 && $hits[0] ne $opt ) {
- $tryopt = $hits[0];
- $tryopt = lc ($tryopt) if $ignorecase;
- print STDERR ("=> option \"$opt\" -> \"$tryopt\"\n")
- if $debug;
- }
- }
-
- # Map to all lowercase if ignoring case.
- elsif ( $ignorecase ) {
- $tryopt = lc ($opt);
- }
-
- # Check validity by fetching the info.
- my $ctl = $opctl->{$tryopt};
- unless ( defined $ctl ) {
- return (0) if $passthrough;
- # Pretend one char when bundling.
- if ( $bundling == 1 && length($starter) == 1 ) {
- $opt = substr($opt,0,1);
- unshift (@$argv, $starter.$rest) if defined $rest;
- }
- if ( $opt eq "" ) {
- warn ("Missing option after ", $starter, "\n");
- }
- else {
- warn ("Unknown option: ", $opt, "\n");
- }
- $error++;
- return (1, undef);
- }
- # Apparently valid.
- $opt = $tryopt;
- print STDERR ("=> found ", OptCtl($ctl),
- " for \"", $opt, "\"\n") if $debug;
-
- #### Determine argument status ####
-
- # If it is an option w/o argument, we're almost finished with it.
- my $type = $ctl->[CTL_TYPE];
- my $arg;
-
- if ( $type eq '' || $type eq '!' || $type eq '+' ) {
- if ( defined $optarg ) {
- return (0) if $passthrough;
- warn ("Option ", $opt, " does not take an argument\n");
- $error++;
- undef $opt;
- undef $optarg if $bundling_values;
- }
- elsif ( $type eq '' || $type eq '+' ) {
- # Supply explicit value.
- $arg = 1;
- }
- else {
- $opt =~ s/^no-?//i; # strip NO prefix
- $arg = 0; # supply explicit value
- }
- unshift (@$argv, $starter.$rest) if defined $rest;
- return (1, $opt, $ctl, $arg);
- }
-
- # Get mandatory status and type info.
- my $mand = $ctl->[CTL_AMIN];
-
- # Check if there is an option argument available.
- if ( $gnu_compat ) {
- my $optargtype = 0; # none, 1 = empty, 2 = nonempty, 3 = aux
- if ( defined($optarg) ) {
- $optargtype = (length($optarg) == 0) ? 1 : 2;
- }
- elsif ( defined $rest || @$argv > 0 ) {
- # GNU getopt_long() does not accept the (optional)
- # argument to be passed to the option without = sign.
- # We do, since not doing so breaks existing scripts.
- $optargtype = 3;
- }
- if(($optargtype == 0) && !$mand) {
- if ( $type eq 'I' ) {
- # Fake incremental type.
- my @c = @$ctl;
- $c[CTL_TYPE] = '+';
- return (1, $opt, \@c, 1);
- }
- my $val
- = defined($ctl->[CTL_DEFAULT]) ? $ctl->[CTL_DEFAULT]
- : $type eq 's' ? ''
- : 0;
- return (1, $opt, $ctl, $val);
- }
- return (1, $opt, $ctl, $type eq 's' ? '' : 0)
- if $optargtype == 1; # --foo= -> return nothing
- }
-
- # Check if there is an option argument available.
- if ( defined $optarg
- ? ($optarg eq '')
- : !(defined $rest || @$argv > 0) ) {
- # Complain if this option needs an argument.
-# if ( $mand && !($type eq 's' ? defined($optarg) : 0) ) {
- if ( $mand ) {
- return (0) if $passthrough;
- warn ("Option ", $opt, " requires an argument\n");
- $error++;
- return (1, undef);
- }
- if ( $type eq 'I' ) {
- # Fake incremental type.
- my @c = @$ctl;
- $c[CTL_TYPE] = '+';
- return (1, $opt, \@c, 1);
- }
- return (1, $opt, $ctl,
- defined($ctl->[CTL_DEFAULT]) ? $ctl->[CTL_DEFAULT] :
- $type eq 's' ? '' : 0);
- }
-
- # Get (possibly optional) argument.
- $arg = (defined $rest ? $rest
- : (defined $optarg ? $optarg : shift (@$argv)));
-
- # Get key if this is a "name=value" pair for a hash option.
- my $key;
- if ($ctl->[CTL_DEST] == CTL_DEST_HASH && defined $arg) {
- ($key, $arg) = ($arg =~ /^([^=]*)=(.*)$/s) ? ($1, $2)
- : ($arg, defined($ctl->[CTL_DEFAULT]) ? $ctl->[CTL_DEFAULT] :
- ($mand ? undef : ($type eq 's' ? "" : 1)));
- if (! defined $arg) {
- warn ("Option $opt, key \"$key\", requires a value\n");
- $error++;
- # Push back.
- unshift (@$argv, $starter.$rest) if defined $rest;
- return (1, undef);
- }
- }
-
- #### Check if the argument is valid for this option ####
-
- my $key_valid = $ctl->[CTL_DEST] == CTL_DEST_HASH ? "[^=]+=" : "";
-
- if ( $type eq 's' ) { # string
- # A mandatory string takes anything.
- return (1, $opt, $ctl, $arg, $key) if $mand;
-
- # Same for optional string as a hash value
- return (1, $opt, $ctl, $arg, $key)
- if $ctl->[CTL_DEST] == CTL_DEST_HASH;
-
- # An optional string takes almost anything.
- return (1, $opt, $ctl, $arg, $key)
- if defined $optarg || defined $rest;
- return (1, $opt, $ctl, $arg, $key) if $arg eq "-"; # ??
-
- # Check for option or option list terminator.
- if ($arg eq $argend ||
- $arg =~ /^$prefix.+/) {
- # Push back.
- unshift (@$argv, $arg);
- # Supply empty value.
- $arg = '';
- }
- }
-
- elsif ( $type eq 'i' # numeric/integer
- || $type eq 'I' # numeric/integer w/ incr default
- || $type eq 'o' ) { # dec/oct/hex/bin value
-
- my $o_valid = $type eq 'o' ? PAT_XINT : PAT_INT;
-
- if ( $bundling && defined $rest
- && $rest =~ /^($key_valid)($o_valid)(.*)$/si ) {
- ($key, $arg, $rest) = ($1, $2, $+);
- chop($key) if $key;
- $arg = ($type eq 'o' && $arg =~ /^0/) ? oct($arg) : 0+$arg;
- unshift (@$argv, $starter.$rest) if defined $rest && $rest ne '';
- }
- elsif ( $arg =~ /^$o_valid$/si ) {
- $arg =~ tr/_//d;
- $arg = ($type eq 'o' && $arg =~ /^0/) ? oct($arg) : 0+$arg;
- }
- else {
- if ( defined $optarg || $mand ) {
- if ( $passthrough ) {
- unshift (@$argv, defined $rest ? $starter.$rest : $arg)
- unless defined $optarg;
- return (0);
- }
- warn ("Value \"", $arg, "\" invalid for option ",
- $opt, " (",
- $type eq 'o' ? "extended " : '',
- "number expected)\n");
- $error++;
- # Push back.
- unshift (@$argv, $starter.$rest) if defined $rest;
- return (1, undef);
- }
- else {
- # Push back.
- unshift (@$argv, defined $rest ? $starter.$rest : $arg);
- if ( $type eq 'I' ) {
- # Fake incremental type.
- my @c = @$ctl;
- $c[CTL_TYPE] = '+';
- return (1, $opt, \@c, 1);
- }
- # Supply default value.
- $arg = defined($ctl->[CTL_DEFAULT]) ? $ctl->[CTL_DEFAULT] : 0;
- }
- }
- }
-
- elsif ( $type eq 'f' ) { # real number, int is also ok
- my $o_valid = PAT_FLOAT;
- if ( $bundling && defined $rest &&
- $rest =~ /^($key_valid)($o_valid)(.*)$/s ) {
- $arg =~ tr/_//d;
- ($key, $arg, $rest) = ($1, $2, $+);
- chop($key) if $key;
- unshift (@$argv, $starter.$rest) if defined $rest && $rest ne '';
- }
- elsif ( $arg =~ /^$o_valid$/ ) {
- $arg =~ tr/_//d;
- }
- else {
- if ( defined $optarg || $mand ) {
- if ( $passthrough ) {
- unshift (@$argv, defined $rest ? $starter.$rest : $arg)
- unless defined $optarg;
- return (0);
- }
- warn ("Value \"", $arg, "\" invalid for option ",
- $opt, " (real number expected)\n");
- $error++;
- # Push back.
- unshift (@$argv, $starter.$rest) if defined $rest;
- return (1, undef);
- }
- else {
- # Push back.
- unshift (@$argv, defined $rest ? $starter.$rest : $arg);
- # Supply default value.
- $arg = 0.0;
- }
- }
- }
- else {
- die("Getopt::Long internal error (Can't happen)\n");
- }
- return (1, $opt, $ctl, $arg, $key);
-}
-
-sub ValidValue ($$$$$) {
- my ($ctl, $arg, $mand, $argend, $prefix) = @_;
-
- if ( $ctl->[CTL_DEST] == CTL_DEST_HASH ) {
- return 0 unless $arg =~ /[^=]+=(.*)/;
- $arg = $1;
- }
-
- my $type = $ctl->[CTL_TYPE];
-
- if ( $type eq 's' ) { # string
- # A mandatory string takes anything.
- return (1) if $mand;
-
- return (1) if $arg eq "-";
-
- # Check for option or option list terminator.
- return 0 if $arg eq $argend || $arg =~ /^$prefix.+/;
- return 1;
- }
-
- elsif ( $type eq 'i' # numeric/integer
- || $type eq 'I' # numeric/integer w/ incr default
- || $type eq 'o' ) { # dec/oct/hex/bin value
-
- my $o_valid = $type eq 'o' ? PAT_XINT : PAT_INT;
- return $arg =~ /^$o_valid$/si;
- }
-
- elsif ( $type eq 'f' ) { # real number, int is also ok
- my $o_valid = PAT_FLOAT;
- return $arg =~ /^$o_valid$/;
- }
- die("ValidValue: Cannot happen\n");
-}
-
-# Getopt::Long Configuration.
-sub Configure (@) {
- my (@options) = @_;
-
- my $prevconfig =
- [ $error, $debug, $major_version, $minor_version, $caller,
- $autoabbrev, $getopt_compat, $ignorecase, $bundling, $order,
- $gnu_compat, $passthrough, $genprefix, $auto_version, $auto_help,
- $longprefix, $bundling_values ];
-
- if ( ref($options[0]) eq 'ARRAY' ) {
- ( $error, $debug, $major_version, $minor_version, $caller,
- $autoabbrev, $getopt_compat, $ignorecase, $bundling, $order,
- $gnu_compat, $passthrough, $genprefix, $auto_version, $auto_help,
- $longprefix, $bundling_values ) = @{shift(@options)};
- }
-
- my $opt;
- foreach $opt ( @options ) {
- my $try = lc ($opt);
- my $action = 1;
- if ( $try =~ /^no_?(.*)$/s ) {
- $action = 0;
- $try = $+;
- }
- if ( ($try eq 'default' or $try eq 'defaults') && $action ) {
- ConfigDefaults ();
- }
- elsif ( ($try eq 'posix_default' or $try eq 'posix_defaults') ) {
- local $ENV{POSIXLY_CORRECT};
- $ENV{POSIXLY_CORRECT} = 1 if $action;
- ConfigDefaults ();
- }
- elsif ( $try eq 'auto_abbrev' or $try eq 'autoabbrev' ) {
- $autoabbrev = $action;
- }
- elsif ( $try eq 'getopt_compat' ) {
- $getopt_compat = $action;
- $genprefix = $action ? "(--|-|\\+)" : "(--|-)";
- }
- elsif ( $try eq 'gnu_getopt' ) {
- if ( $action ) {
- $gnu_compat = 1;
- $bundling = 1;
- $getopt_compat = 0;
- $genprefix = "(--|-)";
- $order = $PERMUTE;
- $bundling_values = 0;
- }
- }
- elsif ( $try eq 'gnu_compat' ) {
- $gnu_compat = $action;
- $bundling = 0;
- $bundling_values = 1;
- }
- elsif ( $try =~ /^(auto_?)?version$/ ) {
- $auto_version = $action;
- }
- elsif ( $try =~ /^(auto_?)?help$/ ) {
- $auto_help = $action;
- }
- elsif ( $try eq 'ignorecase' or $try eq 'ignore_case' ) {
- $ignorecase = $action;
- }
- elsif ( $try eq 'ignorecase_always' or $try eq 'ignore_case_always' ) {
- $ignorecase = $action ? 2 : 0;
- }
- elsif ( $try eq 'bundling' ) {
- $bundling = $action;
- $bundling_values = 0 if $action;
- }
- elsif ( $try eq 'bundling_override' ) {
- $bundling = $action ? 2 : 0;
- $bundling_values = 0 if $action;
- }
- elsif ( $try eq 'bundling_values' ) {
- $bundling_values = $action;
- $bundling = 0 if $action;
- }
- elsif ( $try eq 'require_order' ) {
- $order = $action ? $REQUIRE_ORDER : $PERMUTE;
- }
- elsif ( $try eq 'permute' ) {
- $order = $action ? $PERMUTE : $REQUIRE_ORDER;
- }
- elsif ( $try eq 'pass_through' or $try eq 'passthrough' ) {
- $passthrough = $action;
- }
- elsif ( $try =~ /^prefix=(.+)$/ && $action ) {
- $genprefix = $1;
- # Turn into regexp. Needs to be parenthesized!
- $genprefix = "(" . quotemeta($genprefix) . ")";
- eval { '' =~ /$genprefix/; };
- die("Getopt::Long: invalid pattern \"$genprefix\"\n") if $@;
- }
- elsif ( $try =~ /^prefix_pattern=(.+)$/ && $action ) {
- $genprefix = $1;
- # Parenthesize if needed.
- $genprefix = "(" . $genprefix . ")"
- unless $genprefix =~ /^\(.*\)$/;
- eval { '' =~ m"$genprefix"; };
- die("Getopt::Long: invalid pattern \"$genprefix\"\n") if $@;
- }
- elsif ( $try =~ /^long_prefix_pattern=(.+)$/ && $action ) {
- $longprefix = $1;
- # Parenthesize if needed.
- $longprefix = "(" . $longprefix . ")"
- unless $longprefix =~ /^\(.*\)$/;
- eval { '' =~ m"$longprefix"; };
- die("Getopt::Long: invalid long prefix pattern \"$longprefix\"\n") if $@;
- }
- elsif ( $try eq 'debug' ) {
- $debug = $action;
- }
- else {
- die("Getopt::Long: unknown or erroneous config parameter \"$opt\"\n")
- }
- }
- $prevconfig;
-}
-
-# Deprecated name.
-sub config (@) {
- Configure (@_);
-}
-
-# Issue a standard message for --version.
-#
-# The arguments are mostly the same as for Pod::Usage::pod2usage:
-#
-# - a number (exit value)
-# - a string (lead in message)
-# - a hash with options. See Pod::Usage for details.
-#
-sub VersionMessage(@) {
- # Massage args.
- my $pa = setup_pa_args("version", @_);
-
- my $v = $main::VERSION;
- my $fh = $pa->{-output} ||
- ( ($pa->{-exitval} eq "NOEXIT" || $pa->{-exitval} < 2) ? \*STDOUT : \*STDERR );
-
- print $fh (defined($pa->{-message}) ? $pa->{-message} : (),
- $0, defined $v ? " version $v" : (),
- "\n",
- "(", __PACKAGE__, "::", "GetOptions",
- " version ",
- defined($Getopt::Long::VERSION_STRING)
- ? $Getopt::Long::VERSION_STRING : $VERSION, ";",
- " Perl version ",
- $] >= 5.006 ? sprintf("%vd", $^V) : $],
- ")\n");
- exit($pa->{-exitval}) unless $pa->{-exitval} eq "NOEXIT";
-}
-
-# Issue a standard message for --help.
-#
-# The arguments are the same as for Pod::Usage::pod2usage:
-#
-# - a number (exit value)
-# - a string (lead in message)
-# - a hash with options. See Pod::Usage for details.
-#
-sub HelpMessage(@) {
- eval {
- require Pod::Usage;
- import Pod::Usage;
- 1;
- } || die("Cannot provide help: cannot load Pod::Usage\n");
-
- # Note that pod2usage will issue a warning if -exitval => NOEXIT.
- pod2usage(setup_pa_args("help", @_));
-
-}
-
-# Helper routine to set up a normalized hash ref to be used as
-# argument to pod2usage.
-sub setup_pa_args($@) {
- my $tag = shift; # who's calling
-
- # If called by direct binding to an option, it will get the option
- # name and value as arguments. Remove these, if so.
- @_ = () if @_ == 2 && $_[0] eq $tag;
-
- my $pa;
- if ( @_ > 1 ) {
- $pa = { @_ };
- }
- else {
- $pa = shift || {};
- }
-
- # At this point, $pa can be a number (exit value), string
- # (message) or hash with options.
-
- if ( UNIVERSAL::isa($pa, 'HASH') ) {
- # Get rid of -msg vs. -message ambiguity.
- $pa->{-message} = $pa->{-msg};
- delete($pa->{-msg});
- }
- elsif ( $pa =~ /^-?\d+$/ ) {
- $pa = { -exitval => $pa };
- }
- else {
- $pa = { -message => $pa };
- }
-
- # These are _our_ defaults.
- $pa->{-verbose} = 0 unless exists($pa->{-verbose});
- $pa->{-exitval} = 0 unless exists($pa->{-exitval});
- $pa;
-}
-
-# Sneak way to know what version the user requested.
-sub VERSION {
- $requested_version = $_[1];
- shift->SUPER::VERSION(@_);
-}
-
-package Getopt::Long::CallBack;
-
-sub new {
- my ($pkg, %atts) = @_;
- bless { %atts }, $pkg;
-}
-
-sub name {
- my $self = shift;
- ''.$self->{name};
-}
-
-use overload
- # Treat this object as an ordinary string for legacy API.
- '""' => \&name,
- fallback => 1;
-
-1;
-
-################ Documentation ################
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/Hash/Util.pm b/vendor/LeOS/tools-leos/common/perl-base/Hash/Util.pm
deleted file mode 100644
index 38eee5a9..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/Hash/Util.pm
+++ /dev/null
@@ -1,300 +0,0 @@
-package Hash::Util;
-
-require 5.007003;
-use strict;
-use Carp;
-use warnings;
-no warnings 'uninitialized';
-use warnings::register;
-use Scalar::Util qw(reftype);
-
-require Exporter;
-our @ISA = qw(Exporter);
-our @EXPORT_OK = qw(
- fieldhash fieldhashes
-
- all_keys
- lock_keys unlock_keys
- lock_value unlock_value
- lock_hash unlock_hash
- lock_keys_plus
- hash_locked hash_unlocked
- hashref_locked hashref_unlocked
- hidden_keys legal_keys
-
- lock_ref_keys unlock_ref_keys
- lock_ref_value unlock_ref_value
- lock_hashref unlock_hashref
- lock_ref_keys_plus
- hidden_ref_keys legal_ref_keys
-
- hash_seed hash_value hv_store
- bucket_stats bucket_stats_formatted bucket_info bucket_array
- lock_hash_recurse unlock_hash_recurse
- lock_hashref_recurse unlock_hashref_recurse
-
- hash_traversal_mask
-
- bucket_ratio
- used_buckets
- num_buckets
- );
-BEGIN {
- # make sure all our XS routines are available early so their prototypes
- # are correctly applied in the following code.
- our $VERSION = '0.22';
- require XSLoader;
- XSLoader::load();
-}
-
-sub import {
- my $class = shift;
- if ( grep /fieldhash/, @_ ) {
- require Hash::Util::FieldHash;
- Hash::Util::FieldHash->import(':all'); # for re-export
- }
- unshift @_, $class;
- goto &Exporter::import;
-}
-
-sub lock_ref_keys {
- my($hash, @keys) = @_;
-
- _clear_placeholders(%$hash);
- if( @keys ) {
- my %keys = map { ($_ => 1) } @keys;
- my %original_keys = map { ($_ => 1) } keys %$hash;
- foreach my $k (keys %original_keys) {
- croak "Hash has key '$k' which is not in the new key set"
- unless $keys{$k};
- }
-
- foreach my $k (@keys) {
- $hash->{$k} = undef unless exists $hash->{$k};
- }
- Internals::SvREADONLY %$hash, 1;
-
- foreach my $k (@keys) {
- delete $hash->{$k} unless $original_keys{$k};
- }
- }
- else {
- Internals::SvREADONLY %$hash, 1;
- }
-
- return $hash;
-}
-
-sub unlock_ref_keys {
- my $hash = shift;
-
- Internals::SvREADONLY %$hash, 0;
- return $hash;
-}
-
-sub lock_keys (\%;@) { lock_ref_keys(@_) }
-sub unlock_keys (\%) { unlock_ref_keys(@_) }
-
-#=item B<_clear_placeholders>
-#
-# This function removes any placeholder keys from a hash. See Perl_hv_clear_placeholders()
-# in hv.c for what it does exactly. It is currently exposed as XS by universal.c and
-# injected into the Hash::Util namespace.
-#
-# It is not intended for use outside of this module, and may be changed
-# or removed without notice or deprecation cycle.
-#
-#=cut
-#
-# sub _clear_placeholders {} # just in case someone searches...
-
-sub lock_ref_keys_plus {
- my ($hash,@keys) = @_;
- my @delete;
- _clear_placeholders(%$hash);
- foreach my $key (@keys) {
- unless (exists($hash->{$key})) {
- $hash->{$key}=undef;
- push @delete,$key;
- }
- }
- Internals::SvREADONLY(%$hash,1);
- delete @{$hash}{@delete};
- return $hash
-}
-
-sub lock_keys_plus(\%;@) { lock_ref_keys_plus(@_) }
-
-sub lock_ref_value {
- my($hash, $key) = @_;
- # I'm doubtful about this warning, as it seems not to be true.
- # Marking a value in the hash as RO is useful, regardless
- # of the status of the hash itself.
- carp "Cannot usefully lock values in an unlocked hash"
- if !Internals::SvREADONLY(%$hash) && warnings::enabled;
- Internals::SvREADONLY $hash->{$key}, 1;
- return $hash
-}
-
-sub unlock_ref_value {
- my($hash, $key) = @_;
- Internals::SvREADONLY $hash->{$key}, 0;
- return $hash
-}
-
-sub lock_value (\%$) { lock_ref_value(@_) }
-sub unlock_value (\%$) { unlock_ref_value(@_) }
-
-sub lock_hashref {
- my $hash = shift;
-
- lock_ref_keys($hash);
-
- foreach my $value (values %$hash) {
- Internals::SvREADONLY($value,1);
- }
-
- return $hash;
-}
-
-sub unlock_hashref {
- my $hash = shift;
-
- foreach my $value (values %$hash) {
- Internals::SvREADONLY($value, 0);
- }
-
- unlock_ref_keys($hash);
-
- return $hash;
-}
-
-sub lock_hash (\%) { lock_hashref(@_) }
-sub unlock_hash (\%) { unlock_hashref(@_) }
-
-sub lock_hashref_recurse {
- my $hash = shift;
-
- lock_ref_keys($hash);
- foreach my $value (values %$hash) {
- my $type = reftype($value);
- if (defined($type) and $type eq 'HASH') {
- lock_hashref_recurse($value);
- }
- Internals::SvREADONLY($value,1);
- }
- return $hash
-}
-
-sub unlock_hashref_recurse {
- my $hash = shift;
-
- foreach my $value (values %$hash) {
- my $type = reftype($value);
- if (defined($type) and $type eq 'HASH') {
- unlock_hashref_recurse($value);
- }
- Internals::SvREADONLY($value,0);
- }
- unlock_ref_keys($hash);
- return $hash;
-}
-
-sub lock_hash_recurse (\%) { lock_hashref_recurse(@_) }
-sub unlock_hash_recurse (\%) { unlock_hashref_recurse(@_) }
-
-sub hashref_locked {
- my $hash=shift;
- Internals::SvREADONLY(%$hash);
-}
-
-sub hash_locked(\%) { hashref_locked(@_) }
-
-sub hashref_unlocked {
- my $hash=shift;
- !Internals::SvREADONLY(%$hash);
-}
-
-sub hash_unlocked(\%) { hashref_unlocked(@_) }
-
-sub legal_keys(\%) { legal_ref_keys(@_) }
-sub hidden_keys(\%){ hidden_ref_keys(@_) }
-
-sub bucket_stats {
- my ($hash) = @_;
- my ($keys, $buckets, $used, @length_counts) = bucket_info($hash);
- my $sum;
- my $score;
- for (1 .. $#length_counts) {
- $sum += ($length_counts[$_] * $_);
- $score += $length_counts[$_] * ( $_ * ($_ + 1 ) / 2 );
- }
- $score = $score /
- (( $keys / (2 * $buckets )) * ( $keys + ( 2 * $buckets ) - 1 ))
- if $keys;
- my ($mean, $stddev)= (0, 0);
- if ($used) {
- $mean= $sum / $used;
- $sum= 0;
- $sum += ($length_counts[$_] * (($_-$mean)**2)) for 1 .. $#length_counts;
-
- $stddev= sqrt($sum/$used);
- }
- return $keys, $buckets, $used, $keys ? ($score, $used/$buckets, ($keys-$used)/$keys, $mean, $stddev, @length_counts) : ();
-}
-
-sub _bucket_stats_formatted_bars {
- my ($total, $ary, $start_idx, $title, $row_title)= @_;
-
- my $return = "";
- my $max_width= $total > 64 ? 64 : $total;
- my $bar_width= $max_width / $total;
-
- my $str= "";
- if ( @$ary < 10) {
- for my $idx ($start_idx .. $#$ary) {
- $str .= $idx x sprintf("%.0f", ($ary->[$idx] * $bar_width));
- }
- } else {
- $str= "-" x $max_width;
- }
- $return .= sprintf "%-7s %6d [%s]\n",$title, $total, $str;
-
- foreach my $idx ($start_idx .. $#$ary) {
- $return .= sprintf "%-.3s %3d %6.2f%% %6d [%s]\n",
- $row_title,
- $idx,
- $ary->[$idx] / $total * 100,
- $ary->[$idx],
- "#" x sprintf("%.0f", ($ary->[$idx] * $bar_width)),
- ;
- }
- return $return;
-}
-
-sub bucket_stats_formatted {
- my ($hashref)= @_;
- my ($keys, $buckets, $used, $score, $utilization_ratio, $collision_pct,
- $mean, $stddev, @length_counts) = bucket_stats($hashref);
-
- my $return= sprintf "Keys: %d Buckets: %d/%d Quality-Score: %.2f (%s)\n"
- . "Utilized Buckets: %.2f%% Optimal: %.2f%% Keys In Collision: %.2f%%\n"
- . "Chain Length - mean: %.2f stddev: %.2f\n",
- $keys, $used, $buckets, $score, $score <= 1.05 ? "Good" : $score < 1.2 ? "Poor" : "Bad",
- $utilization_ratio * 100,
- $keys/$buckets * 100,
- $collision_pct * 100,
- $mean, $stddev;
-
- my @key_depth;
- $key_depth[$_]= $length_counts[$_] + ( $key_depth[$_+1] || 0 )
- for reverse 1 .. $#length_counts;
-
- if ($keys) {
- $return .= _bucket_stats_formatted_bars($buckets, \@length_counts, 0, "Buckets", "Len");
- $return .= _bucket_stats_formatted_bars($keys, \@key_depth, 1, "Keys", "Pos");
- }
- return $return
-}
-
-1;
diff --git a/vendor/LeOS/tools-leos/common/perl-base/IO.pm b/vendor/LeOS/tools-leos/common/perl-base/IO.pm
deleted file mode 100644
index 58f5972b..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/IO.pm
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-
-package IO;
-
-use XSLoader ();
-use Carp;
-use strict;
-use warnings;
-
-our $VERSION = "1.38";
-XSLoader::load 'IO', $VERSION;
-
-sub import {
- shift;
-
- warnings::warnif('deprecated', qq{Parameterless "use IO" deprecated})
- if @_ == 0 ;
-
- my @l = @_ ? @_ : qw(Handle Seekable File Pipe Socket Dir);
-
- local @INC = @INC;
- pop @INC if $INC[-1] eq '.';
- eval join("", map { "require IO::" . (/(\w+)/)[0] . ";\n" } @l)
- or croak $@;
-}
-
-1;
-
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/IO/File.pm b/vendor/LeOS/tools-leos/common/perl-base/IO/File.pm
deleted file mode 100644
index ceee5c55..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/IO/File.pm
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-
-package IO::File;
-
-use 5.006_001;
-use strict;
-our($VERSION, @EXPORT, @EXPORT_OK, @ISA);
-use Carp;
-use Symbol;
-use SelectSaver;
-use IO::Seekable;
-
-require Exporter;
-
-@ISA = qw(IO::Handle IO::Seekable Exporter);
-
-$VERSION = "1.16";
-
-@EXPORT = @IO::Seekable::EXPORT;
-
-eval {
- # Make all Fcntl O_XXX constants available for importing
- require Fcntl;
- my @O = grep /^O_/, @Fcntl::EXPORT;
- Fcntl->import(@O); # first we import what we want to export
- push(@EXPORT, @O);
-};
-
-################################################
-## Constructor
-##
-
-sub new {
- my $type = shift;
- my $class = ref($type) || $type || "IO::File";
- @_ >= 0 && @_ <= 3
- or croak "usage: $class->new([FILENAME [,MODE [,PERMS]]])";
- my $fh = $class->SUPER::new();
- if (@_) {
- $fh->open(@_)
- or return undef;
- }
- $fh;
-}
-
-################################################
-## Open
-##
-
-sub open {
- @_ >= 2 && @_ <= 4 or croak 'usage: $fh->open(FILENAME [,MODE [,PERMS]])';
- my ($fh, $file) = @_;
- if (@_ > 2) {
- my ($mode, $perms) = @_[2, 3];
- if ($mode =~ /^\d+$/) {
- defined $perms or $perms = 0666;
- return sysopen($fh, $file, $mode, $perms);
- } elsif ($mode =~ /:/) {
- return open($fh, $mode, $file) if @_ == 3;
- croak 'usage: $fh->open(FILENAME, IOLAYERS)';
- } else {
- return open($fh, IO::Handle::_open_mode_string($mode), $file);
- }
- }
- open($fh, $file);
-}
-
-################################################
-## Binmode
-##
-
-sub binmode {
- ( @_ == 1 or @_ == 2 ) or croak 'usage $fh->binmode([LAYER])';
-
- my($fh, $layer) = @_;
-
- return binmode $$fh unless $layer;
- return binmode $$fh, $layer;
-}
-
-1;
diff --git a/vendor/LeOS/tools-leos/common/perl-base/IO/Handle.pm b/vendor/LeOS/tools-leos/common/perl-base/IO/Handle.pm
deleted file mode 100644
index eb6012b5..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/IO/Handle.pm
+++ /dev/null
@@ -1,391 +0,0 @@
-package IO::Handle;
-
-use 5.006_001;
-use strict;
-our($VERSION, @EXPORT_OK, @ISA);
-use Carp;
-use Symbol;
-use SelectSaver;
-use IO (); # Load the XS module
-
-require Exporter;
-@ISA = qw(Exporter);
-
-$VERSION = "1.36";
-$VERSION = eval $VERSION;
-
-@EXPORT_OK = qw(
- autoflush
- output_field_separator
- output_record_separator
- input_record_separator
- input_line_number
- format_page_number
- format_lines_per_page
- format_lines_left
- format_name
- format_top_name
- format_line_break_characters
- format_formfeed
- format_write
-
- print
- printf
- say
- getline
- getlines
-
- printflush
- flush
-
- SEEK_SET
- SEEK_CUR
- SEEK_END
- _IOFBF
- _IOLBF
- _IONBF
-);
-
-################################################
-## Constructors, destructors.
-##
-
-sub new {
- my $class = ref($_[0]) || $_[0] || "IO::Handle";
- if (@_ != 1) {
- # Since perl will automatically require IO::File if needed, but
- # also initialises IO::File's @ISA as part of the core we must
- # ensure IO::File is loaded if IO::Handle is. This avoids effect-
- # ively "half-loading" IO::File.
- if ($] > 5.013 && $class eq 'IO::File' && !$INC{"IO/File.pm"}) {
- require IO::File;
- shift;
- return IO::File::->new(@_);
- }
- croak "usage: $class->new()";
- }
- my $io = gensym;
- bless $io, $class;
-}
-
-sub new_from_fd {
- my $class = ref($_[0]) || $_[0] || "IO::Handle";
- @_ == 3 or croak "usage: $class->new_from_fd(FD, MODE)";
- my $io = gensym;
- shift;
- IO::Handle::fdopen($io, @_)
- or return undef;
- bless $io, $class;
-}
-
-#
-# There is no need for DESTROY to do anything, because when the
-# last reference to an IO object is gone, Perl automatically
-# closes its associated files (if any). However, to avoid any
-# attempts to autoload DESTROY, we here define it to do nothing.
-#
-sub DESTROY {}
-
-################################################
-## Open and close.
-##
-
-sub _open_mode_string {
- my ($mode) = @_;
- $mode =~ /^\+?(<|>>?)$/
- or $mode =~ s/^r(\+?)$/$1
- or $mode =~ s/^w(\+?)$/$1>/
- or $mode =~ s/^a(\+?)$/$1>>/
- or croak "IO::Handle: bad open mode: $mode";
- $mode;
-}
-
-sub fdopen {
- @_ == 3 or croak 'usage: $io->fdopen(FD, MODE)';
- my ($io, $fd, $mode) = @_;
- local(*GLOB);
-
- if (ref($fd) && "".$fd =~ /GLOB\(/o) {
- # It's a glob reference; Alias it as we cannot get name of anon GLOBs
- my $n = qualify(*GLOB);
- *GLOB = *{*$fd};
- $fd = $n;
- } elsif ($fd =~ m#^\d+$#) {
- # It's an FD number; prefix with "=".
- $fd = "=$fd";
- }
-
- open($io, _open_mode_string($mode) . '&' . $fd)
- ? $io : undef;
-}
-
-sub close {
- @_ == 1 or croak 'usage: $io->close()';
- my($io) = @_;
-
- close($io);
-}
-
-################################################
-## Normal I/O functions.
-##
-
-# flock
-# select
-
-sub opened {
- @_ == 1 or croak 'usage: $io->opened()';
- defined fileno($_[0]);
-}
-
-sub fileno {
- @_ == 1 or croak 'usage: $io->fileno()';
- fileno($_[0]);
-}
-
-sub getc {
- @_ == 1 or croak 'usage: $io->getc()';
- getc($_[0]);
-}
-
-sub eof {
- @_ == 1 or croak 'usage: $io->eof()';
- eof($_[0]);
-}
-
-sub print {
- @_ or croak 'usage: $io->print(ARGS)';
- my $this = shift;
- print $this @_;
-}
-
-sub printf {
- @_ >= 2 or croak 'usage: $io->printf(FMT,[ARGS])';
- my $this = shift;
- printf $this @_;
-}
-
-sub say {
- @_ or croak 'usage: $io->say(ARGS)';
- my $this = shift;
- local $\ = "\n";
- print $this @_;
-}
-
-# Special XS wrapper to make them inherit lexical hints from the caller.
-_create_getline_subs( <<'END' ) or die $@;
-sub getline {
- @_ == 1 or croak 'usage: $io->getline()';
- my $this = shift;
- return scalar <$this>;
-}
-
-sub getlines {
- @_ == 1 or croak 'usage: $io->getlines()';
- wantarray or
- croak 'Can\'t call $io->getlines in a scalar context, use $io->getline';
- my $this = shift;
- return <$this>;
-}
-1; # return true for error checking
-END
-
-*gets = \&getline; # deprecated
-
-sub truncate {
- @_ == 2 or croak 'usage: $io->truncate(LEN)';
- truncate($_[0], $_[1]);
-}
-
-sub read {
- @_ == 3 || @_ == 4 or croak 'usage: $io->read(BUF, LEN [, OFFSET])';
- read($_[0], $_[1], $_[2], $_[3] || 0);
-}
-
-sub sysread {
- @_ == 3 || @_ == 4 or croak 'usage: $io->sysread(BUF, LEN [, OFFSET])';
- sysread($_[0], $_[1], $_[2], $_[3] || 0);
-}
-
-sub write {
- @_ >= 2 && @_ <= 4 or croak 'usage: $io->write(BUF [, LEN [, OFFSET]])';
- local($\) = "";
- $_[2] = length($_[1]) unless defined $_[2];
- print { $_[0] } substr($_[1], $_[3] || 0, $_[2]);
-}
-
-sub syswrite {
- @_ >= 2 && @_ <= 4 or croak 'usage: $io->syswrite(BUF [, LEN [, OFFSET]])';
- if (defined($_[2])) {
- syswrite($_[0], $_[1], $_[2], $_[3] || 0);
- } else {
- syswrite($_[0], $_[1]);
- }
-}
-
-sub stat {
- @_ == 1 or croak 'usage: $io->stat()';
- stat($_[0]);
-}
-
-################################################
-## State modification functions.
-##
-
-sub autoflush {
- my $old = new SelectSaver qualify($_[0], caller);
- my $prev = $|;
- $| = @_ > 1 ? $_[1] : 1;
- $prev;
-}
-
-sub output_field_separator {
- carp "output_field_separator is not supported on a per-handle basis"
- if ref($_[0]);
- my $prev = $,;
- $, = $_[1] if @_ > 1;
- $prev;
-}
-
-sub output_record_separator {
- carp "output_record_separator is not supported on a per-handle basis"
- if ref($_[0]);
- my $prev = $\;
- $\ = $_[1] if @_ > 1;
- $prev;
-}
-
-sub input_record_separator {
- carp "input_record_separator is not supported on a per-handle basis"
- if ref($_[0]);
- my $prev = $/;
- $/ = $_[1] if @_ > 1;
- $prev;
-}
-
-sub input_line_number {
- local $.;
- () = tell qualify($_[0], caller) if ref($_[0]);
- my $prev = $.;
- $. = $_[1] if @_ > 1;
- $prev;
-}
-
-sub format_page_number {
- my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
- my $prev = $%;
- $% = $_[1] if @_ > 1;
- $prev;
-}
-
-sub format_lines_per_page {
- my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
- my $prev = $=;
- $= = $_[1] if @_ > 1;
- $prev;
-}
-
-sub format_lines_left {
- my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
- my $prev = $-;
- $- = $_[1] if @_ > 1;
- $prev;
-}
-
-sub format_name {
- my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
- my $prev = $~;
- $~ = qualify($_[1], caller) if @_ > 1;
- $prev;
-}
-
-sub format_top_name {
- my $old;
- $old = new SelectSaver qualify($_[0], caller) if ref($_[0]);
- my $prev = $^;
- $^ = qualify($_[1], caller) if @_ > 1;
- $prev;
-}
-
-sub format_line_break_characters {
- carp "format_line_break_characters is not supported on a per-handle basis"
- if ref($_[0]);
- my $prev = $:;
- $: = $_[1] if @_ > 1;
- $prev;
-}
-
-sub format_formfeed {
- carp "format_formfeed is not supported on a per-handle basis"
- if ref($_[0]);
- my $prev = $^L;
- $^L = $_[1] if @_ > 1;
- $prev;
-}
-
-sub formline {
- my $io = shift;
- my $picture = shift;
- local($^A) = $^A;
- local($\) = "";
- formline($picture, @_);
- print $io $^A;
-}
-
-sub format_write {
- @_ < 3 || croak 'usage: $io->write( [FORMAT_NAME] )';
- if (@_ == 2) {
- my ($io, $fmt) = @_;
- my $oldfmt = $io->format_name(qualify($fmt,caller));
- CORE::write($io);
- $io->format_name($oldfmt);
- } else {
- CORE::write($_[0]);
- }
-}
-
-sub fcntl {
- @_ == 3 || croak 'usage: $io->fcntl( OP, VALUE );';
- my ($io, $op) = @_;
- return fcntl($io, $op, $_[2]);
-}
-
-sub ioctl {
- @_ == 3 || croak 'usage: $io->ioctl( OP, VALUE );';
- my ($io, $op) = @_;
- return ioctl($io, $op, $_[2]);
-}
-
-# this sub is for compatibility with older releases of IO that used
-# a sub called constant to determine if a constant existed -- GMB
-#
-# The SEEK_* and _IO?BF constants were the only constants at that time
-# any new code should just check defined(&CONSTANT_NAME)
-
-sub constant {
- no strict 'refs';
- my $name = shift;
- (($name =~ /^(SEEK_(SET|CUR|END)|_IO[FLN]BF)$/) && defined &{$name})
- ? &{$name}() : undef;
-}
-
-# so that flush.pl can be deprecated
-
-sub printflush {
- my $io = shift;
- my $old;
- $old = new SelectSaver qualify($io, caller) if ref($io);
- local $| = 1;
- if(ref($io)) {
- print $io @_;
- }
- else {
- print @_;
- }
-}
-
-1;
diff --git a/vendor/LeOS/tools-leos/common/perl-base/IO/Pipe.pm b/vendor/LeOS/tools-leos/common/perl-base/IO/Pipe.pm
deleted file mode 100644
index 010da72d..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/IO/Pipe.pm
+++ /dev/null
@@ -1,160 +0,0 @@
-# IO::Pipe.pm
-#
-# Copyright (c) 1996-8 Graham Barr . All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-
-package IO::Pipe;
-
-use 5.006_001;
-
-use IO::Handle;
-use strict;
-our($VERSION);
-use Carp;
-use Symbol;
-
-$VERSION = "1.15";
-
-sub new {
- my $type = shift;
- my $class = ref($type) || $type || "IO::Pipe";
- @_ == 0 || @_ == 2 or croak "usage: $class->([READFH, WRITEFH])";
-
- my $me = bless gensym(), $class;
-
- my($readfh,$writefh) = @_ ? @_ : $me->handles;
-
- pipe($readfh, $writefh)
- or return undef;
-
- @{*$me} = ($readfh, $writefh);
-
- $me;
-}
-
-sub handles {
- @_ == 1 or croak 'usage: $pipe->handles()';
- (IO::Pipe::End->new(), IO::Pipe::End->new());
-}
-
-my $do_spawn = $^O eq 'os2' || $^O eq 'MSWin32';
-
-sub _doit {
- my $me = shift;
- my $rw = shift;
-
- my $pid = $do_spawn ? 0 : fork();
-
- if($pid) { # Parent
- return $pid;
- }
- elsif(defined $pid) { # Child or spawn
- my $fh;
- my $io = $rw ? \*STDIN : \*STDOUT;
- my ($mode, $save) = $rw ? "r" : "w";
- if ($do_spawn) {
- require Fcntl;
- $save = IO::Handle->new_from_fd($io, $mode);
- my $handle = shift;
- # Close in child:
- unless ($^O eq 'MSWin32') {
- fcntl($handle, Fcntl::F_SETFD(), 1) or croak "fcntl: $!";
- }
- $fh = $rw ? ${*$me}[0] : ${*$me}[1];
- } else {
- shift;
- $fh = $rw ? $me->reader() : $me->writer(); # close the other end
- }
- bless $io, "IO::Handle";
- $io->fdopen($fh, $mode);
- $fh->close;
-
- if ($do_spawn) {
- $pid = eval { system 1, @_ }; # 1 == P_NOWAIT
- my $err = $!;
-
- $io->fdopen($save, $mode);
- $save->close or croak "Cannot close $!";
- croak "IO::Pipe: Cannot spawn-NOWAIT: $err" if not $pid or $pid < 0;
- return $pid;
- } else {
- exec @_ or
- croak "IO::Pipe: Cannot exec: $!";
- }
- }
- else {
- croak "IO::Pipe: Cannot fork: $!";
- }
-
- # NOT Reached
-}
-
-sub reader {
- @_ >= 1 or croak 'usage: $pipe->reader( [SUB_COMMAND_ARGS] )';
- my $me = shift;
-
- return undef
- unless(ref($me) || ref($me = $me->new));
-
- my $fh = ${*$me}[0];
- my $pid;
- $pid = $me->_doit(0, $fh, @_)
- if(@_);
-
- close ${*$me}[1];
- bless $me, ref($fh);
- *$me = *$fh; # Alias self to handle
- $me->fdopen($fh->fileno,"r")
- unless defined($me->fileno);
- bless $fh; # Really wan't un-bless here
- ${*$me}{'io_pipe_pid'} = $pid
- if defined $pid;
-
- $me;
-}
-
-sub writer {
- @_ >= 1 or croak 'usage: $pipe->writer( [SUB_COMMAND_ARGS] )';
- my $me = shift;
-
- return undef
- unless(ref($me) || ref($me = $me->new));
-
- my $fh = ${*$me}[1];
- my $pid;
- $pid = $me->_doit(1, $fh, @_)
- if(@_);
-
- close ${*$me}[0];
- bless $me, ref($fh);
- *$me = *$fh; # Alias self to handle
- $me->fdopen($fh->fileno,"w")
- unless defined($me->fileno);
- bless $fh; # Really wan't un-bless here
- ${*$me}{'io_pipe_pid'} = $pid
- if defined $pid;
-
- $me;
-}
-
-package IO::Pipe::End;
-
-our(@ISA);
-
-@ISA = qw(IO::Handle);
-
-sub close {
- my $fh = shift;
- my $r = $fh->SUPER::close(@_);
-
- waitpid(${*$fh}{'io_pipe_pid'},0)
- if(defined ${*$fh}{'io_pipe_pid'});
-
- $r;
-}
-
-1;
-
-__END__
-
diff --git a/vendor/LeOS/tools-leos/common/perl-base/IO/Seekable.pm b/vendor/LeOS/tools-leos/common/perl-base/IO/Seekable.pm
deleted file mode 100644
index 025b89fa..00000000
--- a/vendor/LeOS/tools-leos/common/perl-base/IO/Seekable.pm
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-
-package IO::Seekable;
-
-use 5.006_001;
-use Carp;
-use strict;
-our($VERSION, @EXPORT, @ISA);
-use IO::Handle ();
-# XXX we can't get these from IO::Handle or we'll get prototype
-# mismatch warnings on C