Reading database from /home/pjcj/g/perl/dev/Devel-Cover-0.3209/cover_db


------------------------------------------ ------ ------ ------ ------ ------
File                                         stmt branch   cond    sub  total
------------------------------------------ ------ ------ ------ ------ ------
tests/dynamic_subs                         100.00  50.00    n/a 100.00  96.00
Total                                      100.00  50.00    n/a 100.00  96.00
------------------------------------------ ------ ------ ------ ------ ------


tests/dynamic_subs

line  err   stmt branch   cond    sub   code
1                                       #!/usr/bin/perl
2                                       
3                                       # Copyright 2004, Paul Johnson (pjcj@cpan.org)
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                                       
10                                      sub gen
11                                      {
12             4                  100       my $x = shift;
13                                          sub
14                                          {
15             5                  100           my $y = shift;
16    ***      5     50                         return $x + $y if $y;
17                                          }
18             4                        };
19                                      
20             1                        my $o = gen(1);
21             1                        my $p = $o->(7);
22             1                        my $q = $o->(8);
23             1                        my $r = gen(1)->(2);
24             1                        my $s = gen(3)->(4);
25             1                        my $t = gen(5)->(6);
26                                      
27             1                        print "$p, $q, $r, $s, $t\n";
28                                      
29             1                        for my $func (qw(f1 f2))
               2                        
30                                      {
31                                          no strict "refs";
32                                          *$func = sub
33                                          {
34             2                  100           my $self = shift;
                                  100   
                                  100   
35             2                                print "$func\n"
36                                          }
37             2                        }
38                                      
39             1                        f1();
40             1                        f2();


Branches
--------

line  err      %   true  false   branch
----- --- ------ ------ ------   ------
16    ***     50      5      0   if $y


Covered Subroutines
-------------------

Subroutine Location             
---------- ---------------------
__ANON__   tests/dynamic_subs:15
__ANON__   tests/dynamic_subs:34
__ANON__   tests/dynamic_subs:34
__ANON__   tests/dynamic_subs:34
gen        tests/dynamic_subs:12