Community maintenance is complete. Thank you for your patience!

Software Development Kit (SDK) and API Discussions

Perl SDK warnings under strict


Actual question I have: what's the right way to report an SDK bug?  This is the second time I've found an SDK issue, and last time I tried, Support seemed BEYOND confused that I don't have a filer problem, I don't have a serial to tag it against, and I don't want help with scripting.. I just want them to BURT something.



5.6 Perl SDK, running scripts with 'use warnings' and 'use strict', in a script that's invoking aggregate_list against OCUM-cDOT 7.0:


Use of uninitialized value $flag in bitwise and (&) at /usr/lib64/perl5/vendor_perl/NetApp-SDK/ line 5378.

That bit is:

sub IsArrayFlag {
    my ($self, $flag) = @_;
    return ($flag & FIELD_ARRAY) == FIELD_ARRAY;


That's coming from,

if ($key_field and $all_api_bindings->IsArrayFlag($key_field->{flags})) {


Here the code gets a little spaghetti, and my eyes are crossing, but I -think- the issue is around line 438, there's

if(ref($existing_value) eq "ARRAY") {

with a simple 'else' later.


But aggregate-info returns a hash, not a scalar or an array.

Really don't want to beat my head on a support case if someone's got a direct line to a developer here, but I will if I must.



Hamfisted workaround:


---	2016-11-18 05:31:30.064255227 +0000
+++	2016-11-18 18:24:55.278917142 +0000
@@ -5375,7 +5375,7 @@

 sub IsArrayFlag {
     my ($self, $flag) = @_;
-    return ($flag & FIELD_ARRAY) == FIELD_ARRAY;
+    return $flag ? (($flag & FIELD_ARRAY) == FIELD_ARRAY) : 0;

 sub IsEncryptedFlag {

There's probably smarter ways with more knowledge of the data structures in play.

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner