Subject: | Typed attributes with Match types are broken |
$ perl -MDios -e 'class A { has Match[\d] $!B; }'
Unquoted string "d" may clash with future reserved word at (eval 5) line 2.
Scalar found where operator expected at (eval 5) line 2, near "] $!"
(Missing operator before $!?)
Bareword found where operator expected at (eval 5) line 2, near "$!B"
(Missing operator before B?)
Invalid class at -e line 1.
Expected:
class <class name> <bases> <block>
but found:
syntax error at -e line 1, near "] $!"
Unmatched right curly bracket at -e line 1, at end of line
syntax error at -e line 1, near "}}"
Compilation failed at -e line 1.
$ perl -MDios -e 'class A { has Match[ ccc ] $!B; }'
Unquoted string "ccc" may clash with future reserved word at (eval 5) line 2.
Scalar found where operator expected at (eval 5) line 2, near "] $!"
(Missing operator before $!?)
Bareword found where operator expected at (eval 5) line 2, near "$!B"
(Missing operator before B?)
Invalid class at -e line 1.
Expected:
class <class name> <bases> <block>
but found:
syntax error at -e line 1, near "] $!"
Unmatched right curly bracket at -e line 1, at end of line
syntax error at -e line 1, near "}}"
Compilation failed at -e line 1.
without whitespaces and nothing special it works:
$ perl -MDios -e 'class A { has Match[ccc] $!B; }'