Quiq/ContentProcessor/File.pm

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