December 2018 Archives

Moose Still gets a A

It is follow-up day here in the Moose-Pen

Having gotten 100% in Database::Accessor it is time now to see what my coverage level with Driver::DBI. On the first run I got;


---------------------------- ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod total
---------------------------- ------ ------ ------ ------ ------ ------
.../lib/Database/Accessor.pm 90.5 55.5 66.6 90.3 0.0 85.4
...ase/Accessor/Constants.pm 100.0 n/a n/a 100.0 n/a…

A++ Moose

Still in cover mode here in the Moose-Pen

I found another sub that was not being tested seem I never call 'da_warn' in my tests.

This one is a little special;


sub da_warn {
my $self = shift;
my ($package, $filename, $line) = caller();
my ($sub,$message) = @_;
warn("$package->$sub(), line:$line, $message");

}


it is in 'Database::Accessor::Roles::Driver' so not really part of Database::Accessor b…

The Mighty Meta Moose

Find and fix a bug day here in the Moose-Pen

The great thing is the new tests I added to fix up my subroutine covers as reported by Delve::Cover revealed that I may have two new bugs in Database::Accessor.

The two fails were;



not ok 92 - no_create flag error on create
ok 93 - no_retrieve flag error on retrieve
not ok 94 - no_update flag error on update


The test is fine as it is failing with the expected error message 'Attempt to use create with no_create flag on' with the err…

Back in the Moose Track

It figured it out day here in the Moose-Pen


Well I really should bow my head in shame again as I got the whole Devel::Cover concept backwards. I thought that changing the code in my application would change the results of cover. Well I was dead wrong on that some further reading on my part and a few more test runs of cover I finally figured out that;


line %  coverage branch
94  50  T  F        if $self->gather


for this sub

sub gather_count{

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations