Debian Codegraph @

tests/moose_cond

raw
1 #!/usr/bin/perl
2
3 # Copyright 2011-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 Moose 2; 23")
11 # __COVER__ skip_reason Moose 2 not available or unreliable with Devel::Cover
12
13 use strict;
14 use warnings;
15
16 package Cover_branch_bug;
17
18 use Moose;
19 has meep => ( isa => 'HashRef', is => 'rw' );
20
21 my $self = __PACKAGE__->new;
22
23 $self->meep( { marp => 0 } );
24 print "meep contains " . $self->wagh . "\n";
25
26 $self->meep( { marp => 1 } );
27 print "meep contains " . $self->wagh . "\n";
28
29 sub wagh {
30 my ( $self ) = @_;
31 my $x = $self || 0;
32 return $self->meep->{marp} || 0;
33 # return $self || 0;
34 }