Debian Codegraph @

tests/moo_cond

raw
1 #!/usr/bin/perl
2
3 # Copyright 2012-2026, Paul Johnson ([email protected])
4
5 # This software is free. It is licensed under the same terms as Perl itself.
6
7 # The latest version of this software should be available from my homepage:
8 # https://pjcj.net
9
10 # __COVER__ skip_test !(eval "use Moo 1.000003; 23")
11 # __COVER__ skip_reason Moo not available
12
13 use strict;
14 use warnings;
15
16 package Cover_branch_bug_Moo;
17
18 use Moo;
19
20 has config => ( is => 'lazy' );
21 has config2 => ( is => 'ro' );
22
23 __PACKAGE__->new( config => {}, config2 => {} )->trigger;
24 __PACKAGE__->new( config => {debug => 1}, config2 => {debug => 1} )->trigger;
25
26 sub trigger {
27 1 if $_[0]->config->{debug};
28 1 if $_[0]->config2->{debug};
29 }