31480d9 Ticket #47515 Fedora 20: setup-ds-admin.pl

Authored and Committed by rmeggins 10 years ago
    Ticket #47515 Fedora 20: setup-ds-admin.pl
    
    https://fedorahosted.org/389/ticket/47515
    Reviewed by: nhosoi (Thanks!)
    Branch: master
    Fix Description: If the last section in the last inf in process_maptbl was
    a simple string scalar, and not a hash ref, the $infsection variable would
    be set to that string scalar, and execution would pass to the next statement
    beyond the foreach loop.  The next statement would attempt to dereference
    that simple string as a hash reference.
    The fix is to just remove that test for the presence of the hash key.  If
    execution got to this point in the code, the hash key was not found, and we
    need to check for a default value, or no key at all.  Note that the old
    code would always have returned true for this condition - calling
    defined($href->{key}) will always return 0 if $href is not really a hash
    ref.
    Not sure why this is a problem on F20 - perhaps perl 5.18 in F20 is much
    more strict with "use strict".
    Platforms tested: RHEL6 x86_64, Fedora 20
    Flag Day: no
    Doc impact: no