Skip to content

Commit

Permalink
failing test for branching coverage of Moo attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
wchristian committed Sep 3, 2012
1 parent 0d23ad2 commit ef3fd42
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/moose_cond
Expand Up @@ -32,3 +32,18 @@ sub wagh {
return $self->meep->{marp} || 0;
# return $self || 0;
}

package Cover_branch_bug_Moo;

use Moo;

has config => ( is => 'lazy' );
has config2 => ( is => 'ro' );

__PACKAGE__->new( config => {}, config2 => {} )->trigger;
__PACKAGE__->new( config => { debug => 1 }, config2 => { debug => 1 } )->trigger;

sub trigger {
1 if $_[0]->config->{debug};
1 if $_[0]->config2->{debug};
}

0 comments on commit ef3fd42

Please sign in to comment.