blib/lib/Acme/MJD/FR.pm

filter: Statementstmt 100% 14 / 14 Branchbran 100% 2 / 2 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 86.9% 20 / 23 CC 3 SCAR 7.9
CC
3
Cov
94%
advice
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
↑ Summary
1 package Acme::MJD::FR;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '0.01';
7  
8 1 my @advice = <DATA>;
9  
10 2 ▶sub advice {
Subroutine advice: called CC=3 SCAR=11.0
Pod undocumented
11 2 my $number = shift;
12 2 ▶ if ($number) {
Branch: 1 branch
BranchTrueFalseTotal
if ($number) { } 1 1 2
13 1 (my $advice) = grep /\Q$number/, @advice;
14 1 ▶ return $advice || '';
Condition50%1/2
$advice || ''
l!l
10
MC/DC0%0/1
$advice || ''
$advice
Truth table50%1/2
A
A= $advice
Aresult
11
00
15 }
16 else {
17 1 return $advice[int rand @advice];
18 }
19 }
20  
21 1 1;
22  
23 =head1 NAME
24  
25 Acme::MJD::FR - the wisdom of Klortho the Magnificent, in French
26  
27 =head1 SYNOPSIS
28  
29 use Acme::MJD::Fr;
30 print Acme::MJD::Fr::advice;
31  
32 =head1 DESCRIPTION
33  
34 MJD's I<Good advice and maxims for programmers>,
35 translated in idiomatic French by Rafael Garcia-Suarez.
36  
37 =head1 LICENSE
38  
39 (c) Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
40  
41 This program is free software; you may redistribute it and/or modify it under
42 the same terms as Perl itself.
43  
44 =head1 SEE ALSO
45  
46 L<Acme::MJD>
47  
48 =cut
49  
50 __DATA__
↑ Summary