Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 34 lines (23 sloc) 0.805 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
#!/usr/bin/perl

# Copyright 2011-2012, Paul Johnson (paul@pjcj.net)

# This software is free. It is licensed under the same terms as Perl itself.

# The latest version of this software should be available from my homepage:
# http://www.pjcj.net

# __COVER__ skip_test $] < 5.010 || !(eval "use Moose 2; 23")
# __COVER__ skip_reason Moose 2 not available or unreliable with Devel::Cover

use strict;
use warnings;

package Cover_branch_bug;

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 ) = @_;
    my $x = $self || 0;
    return $self->meep->{marp} || 0;
    # return $self || 0;
}
Something went wrong with that request. Please try again.