Quiq/Gimp.pm

filter: Statementstmt 65.5% 19 / 29 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 100% 1 / 1 totaltotal 66.6% 26 / 39 CC 3 SCAR 15.4
CC
3
Cov
61%
edit
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 4.7
« Quiq/UrlObj.pm ↑ Summary Quiq/LaTeX/Code.pm »
1 # -----------------------------------------------------------------------------
2  
3 =encoding utf8
4  
5 =head1 NAME
6  
7 Quiq::Gimp - GIMP Operationen
8  
9 =head1 BASE CLASS
10  
11 L<Quiq::Object>
12  
13 =cut
14  
15 # -----------------------------------------------------------------------------
16  
17 package Quiq::Gimp;
18 1 ▶use base qw/Quiq::Object/;
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 1 ▶use Quiq::Path;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 ▶use Quiq::Shell;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 # -----------------------------------------------------------------------------
30  
31 =head1 METHODS
32  
33 =head2 Klassenmethoden
34  
35 =head3 edit() - Editiere Bilder mit GIMP
36  
37 =head4 Synopsis
38  
39 $class->edit(@files);
40  
41 =head4 Arguments
42  
43 =over 4
44  
45 =item @files
46  
47 Pfade der Bilder, die editiert werden sollen.
48  
49 =back
50  
51 =head4 Description
52  
53 Editiere die Bilddateien @files mit GIMP. Es findet eine Tilde-Expansion
54 statt und es wird die Existenz der Pfade geprüft. Existiert ein
55 Pfad nicht, wird eine Exception geworfen.
56  
57 =cut
58  
59 # -----------------------------------------------------------------------------
60  
61 0 ▶sub edit {
Subroutine edit: not called CC=3 SCAR=24.8
Pod documented
62 0 my $class = shift;
63 # @_: @files
64  
65 0 my $p = Quiq::Path->new;
66  
67 0 my @files;
68 0 for (@_) {
69 0 my $file = $p->expandTilde($_);
70 0 ▶ if (!-f $file) {
Branch: 1 branch
BranchTrueFalseTotal
unless (-f $file) 0 0 0
71 0 $class->throw(
72 'GIMP-00001: File not found',
73 File => $file,
74 );
75 }
76 0 push @files,$file;
77 }
78  
79 0 Quiq::Shell->exec("gimp @files");
80  
81 0 return;
82 }
83  
84 # -----------------------------------------------------------------------------
85  
86 =head1 VERSION
87  
88 1.240
89  
90 =head1 AUTHOR
91  
92 Frank Seitz, L<http://fseitz.de/>
93  
94 =head1 COPYRIGHT
95  
96 Copyright (C) 2026 Frank Seitz
97  
98 =head1 LICENSE
99  
100 This code is free software; you can redistribute it and/or modify
101 it under the same terms as Perl itself.
102  
103 =cut
104  
105 # -----------------------------------------------------------------------------
106  
107 1 1;
108  
109 # eof
« Quiq/UrlObj.pm ↑ Summary Quiq/LaTeX/Code.pm »