You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by "Andy Kurth (JIRA)" <ji...@apache.org> on 2015/04/17 17:26:59 UTC

[jira] [Created] (VCL-865) Remove all calls to defined(@array)

Andy Kurth created VCL-865:
------------------------------

             Summary: Remove all calls to defined(@array)
                 Key: VCL-865
                 URL: https://issues.apache.org/jira/browse/VCL-865
             Project: VCL
          Issue Type: Improvement
          Components: vcld (backend)
    Affects Versions: 2.4.2
            Reporter: Andy Kurth
            Priority: Minor


The backend code includes a few calls in the form:
{noformat}
if (defined(@array)) {
   ...
}
{noformat}

This causes a warning to be generated with newer versions of Perl:
{noformat}
defined(@array) is deprecated at
        /usr/local/vcl/bin/../lib/VCL/Module/Provisioning/xCAT.pm line 694 (#1)
    (D deprecated) defined() is not usually useful on arrays because it
    checks for an undefined scalar value.  If you want to see if the
    array is empty, just use if (@array) { # not empty } for example.
{noformat}

All of these should be updated.  I know there are calls in {{xCAT.pm}} and {{vbox.pm}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)