Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 91 lines (74 sloc) 1.58 kb
f283eba Paul Johnson import Devel::Cover 0.32
authored
1 #!/usr/bin/perl
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
2
c7f77d4 Paul Johnson I think my canonical mail address is here to stay.
authored
3 # Copyright 2002-2012, Paul Johnson (paul@pjcj.net)
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
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 # http://www.pjcj.net
9
8c424da Paul Johnson Rebuild golden files.
authored
10 # __COVER__ skip_test $] < 5.008 || $^O eq "cygwin"
11 # __COVER__ skip_reason Busted on 5.6 and cygwin
12
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
13 use strict;
14 use warnings;
15
16 my @x;
17
b768db3 Paul Johnson import Devel::Cover 0.45
authored
18 my $y = 1;
19 my $z = 0;
20 $::foo = 17;
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
21
b123221 Paul Johnson Finish dor support.
authored
22 if ($] >= 5.009)
23 {
24 $ENV{PATH} = "/bin";
25 system "pwd";
26 use lib "tests";
27 my $file = "cond_or.pl";
28 unless (my $return = do $file)
29 {
30 die "couldn't parse $file: $@" if $@;
31 die "couldn't do $file: $!" unless defined $return;
32 die "couldn't run $file" unless $return;
33 }
34 }
35
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
36 for (0 .. 10)
37 {
b123221 Paul Johnson Finish dor support.
authored
38 $y ||
39 $x[1]++;
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
40
b123221 Paul Johnson Finish dor support.
authored
41 $y ||
42 $x[0]++ ||
43 $x[1]++;
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
44
b123221 Paul Johnson Finish dor support.
authored
45 $x[2]++
46 unless $z;
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
47
b123221 Paul Johnson Finish dor support.
authored
48 for (0 .. 2)
49 {
50 $x[3]++;
51 }
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
52
b123221 Paul Johnson Finish dor support.
authored
53 if ($z)
54 {
55 $x[4]++;
56 }
57 else
58 {
59 $x[5]++;
60 }
c6cb737 Paul Johnson import Devel::Cover 0.18
authored
61
b123221 Paul Johnson Finish dor support.
authored
62 my $p = $y || $z;
63 my $q = $z || $y;
64 my $r = $_ || "qqq";
65 my $s = $_ || [];
66 my $t = $y | $z;
67 my $u = $y || 0;
68 my $v = $y || undef;
69 my $w = $z || 0;
c6cb737 Paul Johnson import Devel::Cover 0.18
authored
70
b123221 Paul Johnson Finish dor support.
authored
71 $p ||= $y;
72 $p ||= $z;
73 $x[ 6] ||= $y;
74 $x[ 7] ||= $z;
75 $x[ 8] ||= 1;
76 $x[ 9] ||= {};
77 $x[10] ||= \"foo";
78 $x[11] ||= \$y;
79 $x[12] ||= \*STDIO;
80 $x[13] ||= sub { 1 };
81 $x[14] ||= *::foo{SCALAR};
82 $x[15] ||= *STDIO{IO};
83 $x[16] ||= bless {}, "XXX";
84 $x[17] ||= <<"EOD";
6a998f3 Paul Johnson Assume heredocs are constants.
authored
85 blah
86 EOD
b123221 Paul Johnson Finish dor support.
authored
87 cond_dor(\@x) if exists &cond_dor;
c8c4341 Paul Johnson import Devel::Cover 0.15
authored
88 }
89
90 # print join(", ", @x), "\n";
Something went wrong with that request. Please try again.