summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/xmltohb/fapi_utils.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/targeting/xmltohb/fapi_utils.pl')
-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