in reply to Re^2: defined class variable with Moose
in thread defined class variable with Moose

"but I use description => sub{0} in-stand of description => 0 to keep the consist with other item in my @parserArray, ..."

I only said "you could just use", not "you must use". That was just a suggestion. By all means, keep them consistent.

The main thrust of what I was pointing out, was that a value of 'sub { 0 }->()', or just a plain old '0', will evaluate to 0; however, the 'sub { 0 }' that you showed evaluates to something like CODE(0x7f8c34026a60).

"... what i need to do is to define variable in my class that contain some predefined data"

Isn't @parserArray_type_01 just such a variable with predefined data?

I don't see a reason why you can't use something like $parserArray_type_01[$index]{$key} in your code (whether it uses Moose or not).

Please post a short piece of code (10-20 lines) that demonstrates where such a variable is causing problems.

-- Ken