The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/perl

# Copyright 2004-2014, 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__ uncoverable_file tests/.uncoverable

my $x = 1;
my $y = 1;

# uncoverable branch true
# uncoverable condition left
# uncoverable condition false
if ($x && !$y)
{
    $x++;  # uncoverable statement
    # uncoverable statement
    z();
}

# uncoverable branch true
# uncoverable condition right
# uncoverable condition false
if (!$x && $y)
{
    # uncoverable statement count:1
    # uncoverable statement count:2
    b(); b();
}

sub z
{
    # uncoverable subroutine
    $y++; # uncoverable statement
}

# uncoverable statement
# uncoverable subroutine