Porf/examples/presentation_mini.pl untested

filter: Statementstmt 0.0% 0 / 23 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 30 CC 2 SCAR 12.8
CC
2
Cov
0%
run_example
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 # perl
2 #
3 # Minimal report example, data rows given as hash reference
4 #
5 # PORF Perl Open Report Framework
6 #
7 # Ralf Peine, Wed May 14 10:39:48 2014
8 #
9 #------------------------------------------------------------------------------
10
11 use warnings;
12 use strict;
13
14 use Report::Porf::Framework;
15
16 sub run_example {
17 my $person_rows = shift; # Param1: Reference to list of hashes
18 my $format = shift; # Param2: Optional: format of report
19
20 $format = 'text' unless $format;
21
22 my $count_rows = scalar @{$person_rows};
23 my $out_file_name = "result_presentation_mini_${count_rows}.${format}";
24
25 # --- Write A Report In 4+n Statements ! ---------------------------
26
27 my $report_framework = Report::Porf::Framework::get();
28 my $report = $report_framework->create_report($format);
29
30 $report->configure_column (-header => 'Vorname', -value_named => 'Prename' );
31 $report->conf_col (-h => 'Nachname', -val_nam => 'Surname');
32 $report->cc (-h => 'Alter', -vn => 'Age');
33
34 $report->configure_complete();
35 $report->write_all($person_rows, $out_file_name);
36
37 # --- return count of entries ---------------------------
38
39 return ($count_rows);
40 }
41
42 1;