BEGIN { if (IS_PRODUCTION) { eval <<'SUB'; sub Readonly (\[$@%]@) { given (ref $_[0]) { when ('SCALAR') {${$_[0]} = $_[1]} when ('ARRAY') {@{$_[0]} = @_[1 .. $#_]} when ('HASH') {%{$_[0]} = @_[1 .. $#_]} } } SUB } else { require Readonly; Readonly->import; } }