Quiq/Gnuplot/Graph.pm

filter: Statementstmt 65.0% 13 / 20 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 2 / 2 totaltotal 63.3% 19 / 30 CC 2 SCAR 9.4
CC
2
Cov
59%
hasData
6.0
new
2.0
BEGIN
1.0
CRAP 2.6
« Quiq/Mojolicious/Plugin/Log/Parameters.pm ↑ Summary Quiq/ContentProcessor/SubType.pm »
1 # -----------------------------------------------------------------------------
2  
3 =encoding utf8
4  
5 =head1 NAME
6  
7 Quiq::Gnuplot::Graph - Gnuplot-Graph
8  
9 =head1 BASE CLASS
10  
11 L<Quiq::Hash>
12  
13 =head1 DESCRIPTION
14  
15 Ein Objekt der Klasse repräsentiert einen Graph.
16  
17 =cut
18  
19 # -----------------------------------------------------------------------------
20  
21 package Quiq::Gnuplot::Graph;
22 3 ▶use base qw/Quiq::Hash/;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 3 ▶use v5.10;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 3 our $VERSION = '1.240';
29  
30 # -----------------------------------------------------------------------------
31  
32 =head1 METHODS
33  
34 =head2 Konstruktor
35  
36 =head3 new() - Instantiiere Graph-Objekt
37  
38 =head4 Synopsis
39  
40 $gph = Quiq::Gnuplot::Graph->new(@keyVal);
41  
42 =cut
43  
44 # -----------------------------------------------------------------------------
45  
46 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
47 0 my $class = shift;
48 # @_: @keyVal
49  
50 0 my $self = $class->SUPER::new(
51 title => undef,
52 with => undef,
53 style => undef,
54 data => [],
55 );
56 0 $self->set(@_);
57
58 0 return $self;
59 }
60  
61 # -----------------------------------------------------------------------------
62  
63 =head2 Objektmethoden
64  
65 =head3 hasData() - Prüfe, ob Graph Daten hat
66  
67 =head4 Synopsis
68  
69 $bool = $gph->hasData;
70  
71 =cut
72  
73 # -----------------------------------------------------------------------------
74  
75 0 ▶sub hasData {
Subroutine hasData: not called CC=2 SCAR=17.9
Pod documented
76 0 my $self = shift;
77 0 my $dataA = $self->{'data'};
78 0 ▶ return @$dataA? 1: 0;
Branch: 1 branch
BranchTrueFalseTotal
@$dataA ? : 0 0 0
79 }
80  
81 # -----------------------------------------------------------------------------
82  
83 =head1 VERSION
84  
85 1.240
86  
87 =head1 AUTHOR
88  
89 Frank Seitz, L<http://fseitz.de/>
90  
91 =head1 COPYRIGHT
92  
93 Copyright (C) 2026 Frank Seitz
94  
95 =head1 LICENSE
96  
97 This code is free software; you can redistribute it and/or modify
98 it under the same terms as Perl itself.
99  
100 =cut
101  
102 # -----------------------------------------------------------------------------
103  
104 3 1;
105  
106 # eof
« Quiq/Mojolicious/Plugin/Log/Parameters.pm ↑ Summary Quiq/ContentProcessor/SubType.pm »