Thread

Posted on Tue Jun 24 16:27:42 2008 by mgoldshteyn
Odds and ends
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
Direct Responses: 8147 | Write a response
Posted on Tue Jun 24 18:03:43 2008 by jdhedden in response to 8140
Re: Odds and ends
Thanks for the document corrections. I'll add them to the next release.

The 'scalar' type seems reasonable. I'll add it in. Thanks.
Direct Responses: 8156 | Write a response
Posted on Tue Jun 24 20:24:35 2008 by jdhedden in response to 8147
Re: Odds and ends
'scalar' type checking added to OIO 3.43 which I just uploaded to CPAN. Enjoy.
Write a response