$self->[UTF8] = $conf->{utf8};
Never seen such code before.
What does [] mean here?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In this case, the object
$selfis implemented as a blessed array reference rather than the far more common method of using a blessed hash reference. The syntax$foo->[42]accesses a single element from an array reference. Presumably,UTF8is a constant that returns a numeric index into the array.You see this idiom sometimes when people become convinced (usually incorrectly) that hash lookups on object attributes result in significant overhead and try to prematurely optimize their code.