[
https://issues.apache.org/jira/browse/VCL-865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15933725#comment-15933725
]
ASF subversion and git services commented on VCL-865:
-----------------------------------------------------
Commit 1787857 from [email protected] in branch 'vcl/trunk'
[ https://svn.apache.org/r1787857 ]
VCL-865
Updated 'if (defined(@$x))' calls in vbox.pm to 'if (defined($x))'.
> 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
> Fix For: 2.5
>
>
> 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.15#6346)