Subject: | Too sensitive to whitespace and formatting |
Class::Std v0.0.4, upon perl 5.8.4, Linux
I feel like this must have been reported before, but I can't find reference to in rt or in the docs.
Class::Std does not like when the :ATTRs are broken on to multiple lines (for formatting) and does not if the "(" is not right up against the :ATTR tag. Both of these examples break:
# Compare 1st line with 2nd, only change is spacing the "("
jstrauss@ubuntu:~/bin$ perl -MClass::Std -e 'my %name :ATTR( :get<name>);'
jstrauss@ubuntu:~/bin$ perl -MClass::Std -e 'my %name :ATTR ( :get<name>);'
Invalid separator character '(' in attribute list at -e line 1, near "%name :ATTR "
syntax error at -e line 1, near "%name :ATTR "
Execution of -e aborted due to compilation errors.
# Here I break the ATTRs across lines (I did this in a file to confirm
# it wasn't a command line issue also)
jstrauss@ubuntu:~/bin$ perl -MClass::Std -e 'my %name :ATTR( :get<name>
Show quoted text
> :set<name>);'
Invalid HASH attribute: >);
( :get<name>
:set<name>) at -e line 1
Thanks
Jay