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      100.0
...atabase/Accessor/Types.p…

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 but as it is in the Accessor.pm file I think it should be tested…

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 error message 'No Create, Update or Delete with retrie…

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{
            my $self = shift;
            return 1
        …

Moose Can't get a break

Its start the long releases cycle here at the Moose-Pen

Today I am going to examine some of the results I got from my 'Devel::Cover' run.

ffile                     stmt bran cond sub  pod time total
lib/Database/Accessor.pm 94.4 80.0 88.8 93.7 0.0 23.5 91.7
To start I can basically ignore the 'stmt' section as it is very rare to get 100% in there as I am running at '94.4' I will move onto something else. The next col branch has 80% and following that link I get

line %  coverage branch
94  50  T  F        if $s…