in reply to It is not an array!

I don't see where you've defined sub new for the class. Here's a modest general-purpose one:

# in the Module::Name package sub new { my $class = shift; bless {@_}, $class; }
The object is a hashref blessed into the package which calls it. It's initialized with a hashlike list, same as an ordinary %hash.

After Compline,
Zaxo