Replacing deprecated “defined(@array)” in a ternary operation

后端 未结 3 1270
南笙
南笙 2021-01-28 01:07

I have the following code which needs to be corrected, as defined(@array) is deprecated in the latest Perl.

my @inputs = (
    ( defined @{$padSrc-         


        
3条回答
  •  渐次进展
    2021-01-28 01:51

    That's much more concisely written this way

    my @inputs = ( @{ $padSrc->{inouts} }, @{ $padSrc->{inputs} } );
    

提交回复
热议问题