summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/xmltohb
diff options
context:
space:
mode:
authorcrgeddes <crgeddes@us.ibm.com>2017-08-15 11:06:49 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-08-16 10:22:13 -0400
commit4631a4bc4cede3aba04aa2c88a82f0832e2630c6 (patch)
tree579a23429bb88d767730d4e32201eb120ba18038 /src/usr/targeting/xmltohb
parent120522fd7f1e9b8e6942a63b43ba0b7c08aa504a (diff)
downloadtalos-hostboot-4631a4bc4cede3aba04aa2c88a82f0832e2630c6.tar.gz
talos-hostboot-4631a4bc4cede3aba04aa2c88a82f0832e2630c6.zip
Update perl syntax in new attr gen scripts for perl v5.6.1
Modern version of perl do not allow using hash as a reference. We were sloppy in a few places in the new scripts, this commit updates the syntax to follow latest standards. Change-Id: I43896749b11ebb38e63c668a1c57fa74270c14d8 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44634 Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: STEWART E. SMITH <stewart@linux.vnet.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/xmltohb')
-rw-r--r--[-rwxr-xr-x]src/usr/targeting/xmltohb/fapi_utils.pl13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/usr/targeting/xmltohb/fapi_utils.pl b/src/usr/targeting/xmltohb/fapi_utils.pl
index 7ba1c1fb1..de451b35e 100755..100644
--- a/src/usr/targeting/xmltohb/fapi_utils.pl
+++ b/src/usr/targeting/xmltohb/fapi_utils.pl
@@ -1,3 +1,4 @@
+#!/usr/bin/perl
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
@@ -24,10 +25,12 @@
# IBM_PROLOG_END_TAG
# A collection of utility functions to convert fapi attributes to targeting attributes
-$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
-my $xml = new XML::Simple (KeyAttr=>[]);
+use XML::Simple;
use Digest::MD5 qw(md5_hex);
use strict;
+$XML::Simple::PREFERRED_PARSER = 'XML::Parser';
+my $xml = new XML::Simple (KeyAttr=>[]);
+
# Convert a FAPI2 target type to the equivalent TARGETING type
# Input: fapi2 type
@@ -360,7 +363,7 @@ sub getArrayDimmensions{
my (%attrHash) = @_;
my $retValue = "";
- my $simpleType = %attrHash->{simpleType};
+ my $simpleType = $attrHash{simpleType};
my @keys = keys (%$simpleType);
@@ -368,7 +371,7 @@ sub getArrayDimmensions{
{
if( $key eq "array")
{
- $retValue .= %attrHash->{simpleType}->{$key};
+ $retValue .= $attrHash{simpleType}->{$key};
}
}
#eat whitespace
@@ -407,7 +410,7 @@ sub getAttrType {
my (%attrHash) = @_;
my $retValue = "";
- my $simpleType = %attrHash->{simpleType};
+ my $simpleType = $attrHash{simpleType};
my @keys = keys (%$simpleType);
OpenPOWER on IntegriCloud