|
Well, I've started to use OIO heavily and noticed a few things.
First off, there's a typo in the SYNOPSIS for OIO. In line 16:
'Type' => 'numeriC',
The C in numeric is miscapitalized.
Second, and more importantly, I was looking at the list of available types and didn't see 'scalar' as a type that can be checked. Then, I had a look at the sample below the Field Type Checking heading, where you show that:
my @data :Field :Type(sub { ! ref($_[0]) });
:Acc(data)
Other than the fact that the semicolon looks misplaced in this and the next field, this also demonstrates that a test for whether a particular argument is a scalar or not is also useful. I can confirm that in fact, given that most fields are scalars, having a scalar type test would be great. Also,
:Type('scalar')
... is a lot easier to read than:
:Type(sub { ! ref($_[0]) });
Please reply with your thoughts.
Thanks,
Michael Goldshteyn
|