Skip to content

Instantly share code, notes, and snippets.

@wchristian
Created November 17, 2010 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wchristian/703513 to your computer and use it in GitHub Desktop.
Save wchristian/703513 to your computer and use it in GitHub Desktop.
d:\cpan\Devel--Cover>perl moose.pl
Devel::Cover 0.87: Collecting coverage data for branch, condition, pod, statement, subroutine and time.
Selecting packages matching:
Ignoring packages matching:
/Devel/Cover[./]
^t/
\.t$
^test\.pl$
Ignoring packages in:
.
C:/Perl/lib
C:/Perl/site/lib
C:/Perl/site/lib/MSWin32-x86-multi-thread
C:/Users/Mithaldu/AppData/Local/Temp/CPAN-Reporter-lib-1Yv7
meep contains 0
meep contains 1
Devel::Cover: Writing coverage database to d:/cpan/Devel--Cover/cover_db/runs/1338895120.501136.54472
---------------------------- ------ ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod time total
---------------------------- ------ ------ ------ ------ ------ ------ ------
...pan/Devel--Cover/moose.pl 100.0 0.0 n/a 100.0 n/a 100.0 86.7
Total 100.0 0.0 n/a 100.0 n/a 100.0 86.7
---------------------------- ------ ------ ------ ------ ------ ------ ------
d:\cpan\Devel--Cover>
use strict;
use warnings;
package cover_branch_bug;
use Devel::Cover;
use Moose;
has meep => ( isa => 'HashRef', is => 'rw' );
my $self = __PACKAGE__->new;
$self->meep( { marp => 0 } );
print "meep contains " . $self->wagh . "\n";
$self->meep( { marp => 1 } );
print "meep contains " . $self->wagh . "\n";
sub wagh {
my ( $self ) = @_;
$self->meep->{marp} || 0;
}
__END__
meep contains 0
meep contains 1
Devel::Cover: Writing coverage database to D:/traffics/bug/cover_db/runs/1290008671.8700.62150
---------------------------- ------ ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod time total
---------------------------- ------ ------ ------ ------ ------ ------ ------
script.pl 100.0 n/a 0.0 100.0 n/a 100.0 86.7
Total 100.0 n/a 0.0 100.0 n/a 100.0 86.7
---------------------------- ------ ------ ------ ------ ------ ------ ------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment