Today I started to try to learn Bivio-BOP in earnest. After grousing
around, I came across the unit testing framework. This is a neat way
to catalog all of my expectations about using methods in the Bivio
framework. It also fits in with the Extreme Perl methodology. Comments
and questions on my first day of spelunking follow:
+ the example in the description needs a
use Bivio::Test
line in it to work
also, my Xemacs cperl-mode indents Perl code differently than the
example. I would like to use the same indent style as in the
example. could anyone share some settings with me?
+ If the test tuple has any scalar as the expected output, the return
result of the method call will be ignored: it doesn't have to be
undef as the docs suggest.
+ I am a bit confused by ther terminology regexp_ref as used here in
the docs:
If the expect is a regexp_ref, the entire return will be compared to
expect. return will be stringified with Bivio::IO::Ref::to_string.
here is my guess at what this means:
my $regexp = qr/a.{3}b/;
my $regexp_ref = \$regexp;
my $test_tuple = [ $input_data ] => $regexp_ref
Is there an example use of this feature somewhere in the distro?
+ object is missing from the object group options list, yet it is an
object group option
+ Is it correct to assume that 30 is the argument to the constructor
of the class Bivio::Math::EMA?
+ some of your subroutines are prefaced with the word "callback"
others with the word "static" and some with nothing. Is the
semantics of these conventions discussed somewhere?
+ I found the error message from this program
use Bivio::Math::EMA;
my $ema = Bivio::Math::EMA->new();
warn $ema->compute(1);
warn $ema->compute(2);
warn $ema->compute(2);
hard to trace:
Bivio::Type:232 Bivio::DieCode::DIE: class=>Bivio::Type::Integer entity=><undef>
error_enum=>Bivio::TypeError::NULL message=>from_literal failed: field may not
be empty program_error=>1
there is no line number. How should I look at this output in order
to ascertain the source of the problem?
After fixing my error, the warn output is also new to me:
ema.pl:5 ema.pl:5 1
ema.pl:6 ema.pl:6 1.06451612903226
ema.pl:7 ema.pl:7 1.12486992715921
Could I get some feedback on what the 5, 6, and 7 represent? I know
what the 1, 1.06..., 1.124 are.
+ It appears that the wisest path to forge through the zoo of Bivio
functionality is to understand the type system. So, my next safari
will report my efforts on a trip through the Bivio and Petshop type
hierarchy.
So long for now fellow adventurers,
--
Carter's Compass: I know I'm on the right track when,
by deleting something, I'm adding functionality.