Porf/examples/short_object.pl untested

filter: Statementstmt 0.0% 0 / 21 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 / 28 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 using shortest options,
4 # data rows given as object instance
5 #
6 # PORF Perl Open Report Framework
7 #
8 # Ralf Peine, Wed May 14 10:39:49 2014
9 #
10 #------------------------------------------------------------------------------
11  
12 use warnings;
13 use strict;
14  
15 use Report::Porf::Framework;
16  
17 sub run_example {
18 my $person_rows = shift; # Param1: Reference to list of objects
19 my $format = shift; # Param2: Optional: format of report
20  
21 $format = 'text' unless $format;
22  
23 # --- create Report -------------------------------------------------------
24 my $report_frame_work = Report::Porf::Framework::get();
25 my $r = $report_frame_work->create_report($format);
26  
27 # $r->set_verbose(3); # uncomment to see infos about configuring phase
28  
29 # --- Configure Report ----------------------------------------------------
30  
31 $r->cc(-h => 'Prename', -vo => 'get_prename()');
32 $r->cc(-h => 'Surname', -vo => 'get_surname()');
33 $r->cc(-h => 'Age', -vo => 'get_age()' );
34  
35 $r->configure_complete();
36  
37 # --- print out table -----------------------------------
38  
39 $r->write_all($person_rows); # print STDOUT ...
40  
41 # --- return count of entries ---------------------------
42  
43 return (scalar @{$person_rows});
44 }
45  
46 1;