Due to changes in Perl internals, some perl<->json assumptions no longer hold
as of perl 5.18. This commit forces stable hash key generation and ordering
so that some of our uses do not suffer.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# ---------------------------------------------------------------
+
+BEGIN {
+ #warn("Checking PERL_HASH_SEED...\n");
+ if (!defined($ENV{PERL_HASH_SEED}) or $ENV{PERL_HASH_SEED} !=0) {
+ my $cmd = join(' ', 'PERL_HASH_SEED=0 /usr/bin/perl', $0, @ARGV);
+ #warn("Restarting with PERL_HASH_SEED=0: $cmd \n");
+ exec($cmd) or die "Cannot exec";
+ }
+}
+
use strict; use warnings;
use Getopt::Long;
use Net::Domain qw/hostfqdn/;