summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr')
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/handle_duplicate.pl6
-rwxr-xr-xsrc/usr/targeting/common/xmltohb/handle_fapi_attr_mapping.pl6
-rw-r--r--[-rwxr-xr-x]src/usr/targeting/xmltohb/fapi_utils.pl13
3 files changed, 14 insertions, 11 deletions
diff --git a/src/usr/targeting/common/xmltohb/handle_duplicate.pl b/src/usr/targeting/common/xmltohb/handle_duplicate.pl
index 1a03df31a..e41cea3c2 100755
--- a/src/usr/targeting/common/xmltohb/handle_duplicate.pl
+++ b/src/usr/targeting/common/xmltohb/handle_duplicate.pl
@@ -112,7 +112,7 @@ foreach my $attribute (@{$allHBAttributes->{attribute}})
{
if (exists $attribute->{hwpfToHbAttrMap} )
{
- push (@{%hwpfAttributes->{attribute}}, $attribute);
+ push (@{$hwpfAttributes{attribute}}, $attribute);
}
}
@@ -147,7 +147,7 @@ foreach my $ekbAttr (@{$allEKBAttributes->{attribute}})
}
#Loop over HB attrs until we find a match
- foreach my $hbAttr (@{%hwpfAttributes->{attribute}})
+ foreach my $hbAttr (@{$hwpfAttributes{attribute}})
{
my $hbFapiId = $hbAttr->{hwpfToHbAttrMap}[0]->{id};
@@ -217,7 +217,7 @@ foreach my $ekbEnum (@{$allEKBAttributes->{enumerationType}})
my $ekbEnumId = $ekbEnum->{id};
my $theHbEnum;
#we dont want to add duplicates so check if the enumeration exists already in HB
- foreach my $hbEnum (@{%$allHBAttributes->{enumerationType}})
+ foreach my $hbEnum (@{$allHBAttributes->{enumerationType}})
{
my $hbEnumId = $hbEnum->{id};
diff --git a/src/usr/targeting/common/xmltohb/handle_fapi_attr_mapping.pl b/src/usr/targeting/common/xmltohb/handle_fapi_attr_mapping.pl
index 05b2cb7fd..e1f8f7542 100755
--- a/src/usr/targeting/common/xmltohb/handle_fapi_attr_mapping.pl
+++ b/src/usr/targeting/common/xmltohb/handle_fapi_attr_mapping.pl
@@ -113,7 +113,7 @@ foreach my $attribute (@{$allAttributes->{attribute}})
{
if (exists $attribute->{hwpfToHbAttrMap} )
{
- push (@{%hwpfAttributes->{attribute}}, $attribute);
+ push (@{$hwpfAttributes{attribute}}, $attribute);
}
}
@@ -192,7 +192,7 @@ foreach my $targetType ( @{$srcTargetTypes->{targetType}})
}
if($id eq $NewAttr[$i][0])
{
- push (@{%$targetType->{attribute}}, \%attrHash);
+ push (@{$targetType->{attribute}}, \%attrHash);
}
}
}
@@ -205,7 +205,7 @@ foreach my $targetType (@{$srcTargetTypes->{targetType}})
foreach my $attribute (@{$targetType->{attribute}})
{
#check if there is a hostboot mapping w/ a different name
- foreach my $hbMappedAttr (@{%hwpfAttributes->{attribute}})
+ foreach my $hbMappedAttr (@{$hwpfAttributes{attribute}})
{
my $fapiAttrId = $hbMappedAttr->{hwpfToHbAttrMap}[0]->{id};
$fapiAttrId = substr $fapiAttrId , 5;
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