Reading database from ...
------------------------------------------ ------ ------ ------ ------ ------
File stmt bran cond sub total
------------------------------------------ ------ ------ ------ ------ ------
tests/alias 100.0 100.0 n/a 100.0 100.0
Total 100.0 100.0 n/a 100.0 100.0
------------------------------------------ ------ ------ ------ ------ ------
Run: ...
Perl version: ...
OS: ...
Start: ...
Finish: ...
tests/alias
line err stmt bran cond sub code
1 #!/usr/bin/perl
2
3 # Copyright 2004-2017, Paul Johnson (paul@pjcj.net)
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 package Foo;
11
12 sub is_3digits {
13 2 2 my $val = shift;
14 2 my $retval = undef;
15 2 100 $retval=1 if $val =~ /^\d{3}$/;
16 2 return $retval;
17 }
18
19 package main;
20
21 1 *main::is_3digits = *Foo::is_3digits;
22 # delete $Foo::{is_3digits};
23
24 1 is_3digits(1234);
25 1 is_3digits(123);
Branches
--------
line err % true false branch
----- --- ------ ------ ------ ------
15 100 1 1 if $val =~ /^\d{3}$/
Covered Subroutines
-------------------
Subroutine Count Location
---------- ----- --------------
is_3digits 2 tests/alias:13