| 1 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | =encoding utf8 | ||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | Quiq::TimeLapse::Directory - Bildsequenz-Verzeichnis | ||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | =head1 BASE CLASS | ||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||
| 11 | L<Quiq::Hash> | ||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||
| 13 | =head1 SYNOPSIS | ||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | # Klasse laden | ||||||||||||||||||||||||||||||||||||||||||
| 16 | use Quiq::TimeLapse::Directory; | ||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | # Instantiiere Verzeichnis-Objekt | ||||||||||||||||||||||||||||||||||||||||||
| 19 | $tdr = Quiq::TimeLapse::Directory->new('/my/image/dir'); | ||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||
| 21 | # Anzahl der enthaltenen Bilder | ||||||||||||||||||||||||||||||||||||||||||
| 22 | $n = $tdr->count; | ||||||||||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||||||||||
| 24 | # Niedrigste Bildnummer | ||||||||||||||||||||||||||||||||||||||||||
| 25 | $n = $tdr->minNumber; | ||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||
| 27 | # Höchste Bildnummer | ||||||||||||||||||||||||||||||||||||||||||
| 28 | $n = $tdr->maxNumber; | ||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | # alle Bilder (des Verzeichnisses oder aus range.def, wenn definiert) | ||||||||||||||||||||||||||||||||||||||||||
| 31 | @images = $tdr->images; | ||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||
| 33 | # Bilder eines Nummernbereichs | ||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | @images = $tdr->images('113-234'); | ||||||||||||||||||||||||||||||||||||||||||
| 36 | @images = $tdr->images('290-'); | ||||||||||||||||||||||||||||||||||||||||||
| 37 | @images = $tdr->images('422'); | ||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||
| 39 | # Bilder zu einem Bezeichner aus range.def | ||||||||||||||||||||||||||||||||||||||||||
| 40 | @images = $tdr->images('autofahrt'); | ||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | # Alle Bilder des Verzeichnisses | ||||||||||||||||||||||||||||||||||||||||||
| 43 | @images = $tdr->images('all'); | ||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | # Alle Bilder aus range.def (leer, wenn range.def nicht existiert) | ||||||||||||||||||||||||||||||||||||||||||
| 46 | @images = $tdr->images('used'); | ||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||
| 48 | # Alle Bilder des Verzeichnisses, die nicht range.def vorkommen | ||||||||||||||||||||||||||||||||||||||||||
| 49 | # (leer, wenn range.def nicht existiert) | ||||||||||||||||||||||||||||||||||||||||||
| 50 | @images = $tdr->images('unused'); | ||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||
| 52 | # Lookup eines Bildes | ||||||||||||||||||||||||||||||||||||||||||
| 53 | $img = $tdr->image(422); # liefert undef, wenn nicht existent | ||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||
| 55 | # Liefere das Objekt mit den Range- und Clip-Definitionen. Über | ||||||||||||||||||||||||||||||||||||||||||
| 56 | # dieses Objekt können die Bildfolgen von Ranges und Clips gezielt | ||||||||||||||||||||||||||||||||||||||||||
| 57 | # abgerufen werden. Details siehe Quiq::TimeLapse::RangeDef | ||||||||||||||||||||||||||||||||||||||||||
| 58 | $trd = $tdr->rangeDef; | ||||||||||||||||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||||||||||||||||
| 60 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||
| 62 | Ein Objekt der Klasse repräsentiert ein Verzeichnis, das eine | ||||||||||||||||||||||||||||||||||||||||||
| 63 | geordnete Liste von Bildern enthält, ggf. verteilt über mehrere | ||||||||||||||||||||||||||||||||||||||||||
| 64 | Unterverzeichnisse. Die Bilder können einzeln über ihre Bildnummer | ||||||||||||||||||||||||||||||||||||||||||
| 65 | oder als Bildfolge über die Angabe eines Nummern-Bereichs oder | ||||||||||||||||||||||||||||||||||||||||||
| 66 | eines Range- oder Clip-Bezeichners (definiert in der Datei | ||||||||||||||||||||||||||||||||||||||||||
| 67 | range.def) abgefragt werden. | ||||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||
| 69 | Mit der Liste von Bildern kann eine Bildfolge | ||||||||||||||||||||||||||||||||||||||||||
| 70 | (Quiq::TimeLapse::Sequence) instantiiert werden, aus welcher | ||||||||||||||||||||||||||||||||||||||||||
| 71 | u.a. ein Video generiert werden kann. Siehe die Doku dieser Klasse. | ||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||
| 73 | =head1 ATTRIBUTES | ||||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||||||||||||||||
| 77 | =item dir | ||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||
| 79 | Pfad des Verzeichnisses. | ||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||
| 81 | =item imageA | ||||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||
| 83 | Array der Bilddatei-Objekte des Verzeichnisses, nach Bildnummer | ||||||||||||||||||||||||||||||||||||||||||
| 84 | sortiert. | ||||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||
| 86 | =item imageH | ||||||||||||||||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||||||||||||||||
| 88 | Hash der Bilddatei-Objekte, mit Bildnummer als Schlüssel. | ||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||
| 90 | =item rangeDef | ||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||
| 92 | Referenz auf das Rangedatei-Objekt. Die Referenz wird beim ersten | ||||||||||||||||||||||||||||||||||||||||||
| 93 | Zugriff zugewiesen. Existiert die Datei range.def nicht, wird eine | ||||||||||||||||||||||||||||||||||||||||||
| 94 | Exception geworfen. | ||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||
| 96 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 97 | |||||||||||||||||||||||||||||||||||||||||||
| 98 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||||||
| 100 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||
| 102 | package Quiq::TimeLapse::Directory; | ||||||||||||||||||||||||||||||||||||||||||
| 103 | 3 | ▶ | use base qw/Quiq::Hash/; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 104 | |||||||||||||||||||||||||||||||||||||||||||
| 105 | 3 | ▶ | use v5.10; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 106 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 107 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||
| 109 | 3 | our $VERSION = '1.240'; | |||||||||||||||||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||||||||||||||||
| 111 | 3 | ▶ | use Quiq::Path; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 112 | 3 | ▶ | use Quiq::TimeLapse::File; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 113 | 3 | ▶ | use Quiq::TimeLapse::RangeDef; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 114 | 3 | ▶ | use Quiq::Option; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 115 | 3 | ▶ | use Quiq::Image; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 116 | 3 | ▶ | use Quiq::Progress; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||||||||||||||||
| 118 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||
| 120 | =head1 METHODS | ||||||||||||||||||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||||||||||||||||
| 122 | =head2 Konstruktor | ||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||
| 124 | =head3 new() - Instantiiere Bildverzeichnis-Objekt | ||||||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||||||
| 126 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||
| 128 | $tdr = $class->new($dir); | ||||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||
| 130 | =head4 Arguments | ||||||||||||||||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||||||||||||||||
| 132 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||
| 134 | =item $dir | ||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||
| 136 | Wurzelverzeichnis. | ||||||||||||||||||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||||||||||||||||||
| 138 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||
| 140 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 141 | |||||||||||||||||||||||||||||||||||||||||||
| 142 | Referenz auf Bildverzeichnis-Objekt | ||||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||
| 144 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||
| 146 | Instantiiere ein Bildverzeichnis-Objekt aus den Bildern in der | ||||||||||||||||||||||||||||||||||||||||||
| 147 | Verzeichnisstruktur $dir und liefere eine Referenz auf dieses | ||||||||||||||||||||||||||||||||||||||||||
| 148 | Objekt zurück. Die Verzeichnisstuktur wird per find() nach | ||||||||||||||||||||||||||||||||||||||||||
| 149 | Bilddateien durchsucht und kann daher beliebig tief verschachtelt | ||||||||||||||||||||||||||||||||||||||||||
| 150 | sein. | ||||||||||||||||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||||||||||||||||
| 152 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||
| 154 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | ▶ | sub new { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | my ($class,$dir) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||||||||||||||
| 159 | # Bilddateien ermitteln | ||||||||||||||||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | my @images; | |||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | for my $file (Quiq::Path->find($dir,-type=>'f',-decode=>'utf-8')) { | |||||||||||||||||||||||||||||||||||||||||
| 163 | 0 | ▶ | if ($file =~ /range.def$/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 164 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||
| 165 | } | ||||||||||||||||||||||||||||||||||||||||||
| 166 | 0 | push @images,Quiq::TimeLapse::File->new($file); | |||||||||||||||||||||||||||||||||||||||||
| 167 | } | ||||||||||||||||||||||||||||||||||||||||||
| 168 | |||||||||||||||||||||||||||||||||||||||||||
| 169 | # Bild-Array sortieren | ||||||||||||||||||||||||||||||||||||||||||
| 170 | 0 | @images = sort {$a->number <=> $b->number} @images; | |||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||
| 172 | # Bild-Hash aufbauen. Die Bildnummer muss eindeutig sein. | ||||||||||||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | my %hash; | |||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | for my $img (@images) { | |||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | my $n = $img->number; | |||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | ▶ | if ($hash{$n}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | $class->throw( | |||||||||||||||||||||||||||||||||||||||||
| 179 | 'TIMELAPSE-00002: Duplicate image number', | ||||||||||||||||||||||||||||||||||||||||||
| 180 | Number => $n, | ||||||||||||||||||||||||||||||||||||||||||
| 181 | File => $img->path, | ||||||||||||||||||||||||||||||||||||||||||
| 182 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 183 | } | ||||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | $hash{$n} = $img; | |||||||||||||||||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||||
| 187 | # Sequenz-Objekt instantiieren | ||||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | return $class->SUPER::new( | |||||||||||||||||||||||||||||||||||||||||
| 190 | dir => $dir, | ||||||||||||||||||||||||||||||||||||||||||
| 191 | imageA => \@images, | ||||||||||||||||||||||||||||||||||||||||||
| 192 | imageH => \%hash, | ||||||||||||||||||||||||||||||||||||||||||
| 193 | rangeDef => Quiq::TimeLapse::RangeDef->new($dir), | ||||||||||||||||||||||||||||||||||||||||||
| 194 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 195 | } | ||||||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||||||
| 197 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||
| 199 | =head2 Akzessoren | ||||||||||||||||||||||||||||||||||||||||||
| 200 | |||||||||||||||||||||||||||||||||||||||||||
| 201 | =head3 dir() - Pfad des Zeitraffer-Verzeichnisses | ||||||||||||||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||||||||||||||
| 203 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||||||||||||||||
| 205 | $path = $tdr->dir; | ||||||||||||||||||||||||||||||||||||||||||
| 206 | $path = $tdr->dir($subPath); | ||||||||||||||||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||||||||||||||||
| 208 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||
| 210 | Liefere den Pfad des Zeitraffer-Verzeichnisses. Ist Zeichenkette | ||||||||||||||||||||||||||||||||||||||||||
| 211 | $subPath angegeben, wird diese mit '/' getrennt an den Pfad | ||||||||||||||||||||||||||||||||||||||||||
| 212 | angefügt. | ||||||||||||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||||||||||||
| 214 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 215 | |||||||||||||||||||||||||||||||||||||||||||
| 216 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | ▶ | sub dir { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
dir: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 219 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 220 | # @_: $subPath | ||||||||||||||||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||||||||||||||||
| 222 | 0 | my $path = $self->{'dir'}; | |||||||||||||||||||||||||||||||||||||||||
| 223 | 0 | ▶ | if (@_) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | $path .= '/'.shift; | |||||||||||||||||||||||||||||||||||||||||
| 225 | } | ||||||||||||||||||||||||||||||||||||||||||
| 226 | |||||||||||||||||||||||||||||||||||||||||||
| 227 | 0 | return $path; | |||||||||||||||||||||||||||||||||||||||||
| 228 | } | ||||||||||||||||||||||||||||||||||||||||||
| 229 | |||||||||||||||||||||||||||||||||||||||||||
| 230 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||||||||||||||||
| 232 | =head2 Objektmethoden | ||||||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||||||
| 234 | =head3 count() - Anzahl aller Bilder | ||||||||||||||||||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||||||||||||||||||
| 236 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 237 | |||||||||||||||||||||||||||||||||||||||||||
| 238 | $n = $tdr->count; | ||||||||||||||||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||||||||||||||||
| 240 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||||||||||||||||
| 242 | Integer >= 0 | ||||||||||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||||||||||
| 244 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||||||||||||||||||
| 246 | Liefere die Anzahl der im Zeitraffer-Verzeichnis enthaltenen Bilder. | ||||||||||||||||||||||||||||||||||||||||||
| 247 | |||||||||||||||||||||||||||||||||||||||||||
| 248 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||||
| 250 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | ▶ | sub count { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
count: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 253 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 254 | 0 | return scalar @{$self->imageA}; | |||||||||||||||||||||||||||||||||||||||||
| 255 | } | ||||||||||||||||||||||||||||||||||||||||||
| 256 | |||||||||||||||||||||||||||||||||||||||||||
| 257 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||||||||||||||||
| 259 | =head3 minNumber() - Niedrigste Bildnummer | ||||||||||||||||||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||||||||||||||||||
| 261 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||||||||||||||||
| 263 | $n = $tdr->minNumber; | ||||||||||||||||||||||||||||||||||||||||||
| 264 | |||||||||||||||||||||||||||||||||||||||||||
| 265 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 266 | |||||||||||||||||||||||||||||||||||||||||||
| 267 | Integer >= 0 | ||||||||||||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||||||||||||
| 269 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||||||||||||
| 271 | Liefere die niedrigste Bildnummer. Die niedrigste Bildnummer ist | ||||||||||||||||||||||||||||||||||||||||||
| 272 | die Nummer des ersten Bildes. Ist die Liste leer, liefere 0. | ||||||||||||||||||||||||||||||||||||||||||
| 273 | |||||||||||||||||||||||||||||||||||||||||||
| 274 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 275 | |||||||||||||||||||||||||||||||||||||||||||
| 276 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | ▶ | sub minNumber { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
minNumber: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 279 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | ▶ | return $self->count? $self->imageA->[0]->number: 0; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 281 | } | ||||||||||||||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||||||||||||||
| 283 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 284 | |||||||||||||||||||||||||||||||||||||||||||
| 285 | =head3 maxNumber() - Höchste Bildnummer | ||||||||||||||||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||||||||||||||||
| 287 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 288 | |||||||||||||||||||||||||||||||||||||||||||
| 289 | $n = $tdr->maxNumber; | ||||||||||||||||||||||||||||||||||||||||||
| 290 | |||||||||||||||||||||||||||||||||||||||||||
| 291 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||||||||||||||
| 293 | Integer >= 0 | ||||||||||||||||||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||||||||||||||||||
| 295 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 296 | |||||||||||||||||||||||||||||||||||||||||||
| 297 | Liefere die höchste Bildnummer. Die höchste Bildnummer ist die | ||||||||||||||||||||||||||||||||||||||||||
| 298 | Nummer des letzten Bildes. Ist die Liste leer, liefere 0. | ||||||||||||||||||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||||||||||||||||||
| 300 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||||||||||||||||||
| 302 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 303 | |||||||||||||||||||||||||||||||||||||||||||
| 304 | 0 | ▶ | sub maxNumber { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
maxNumber: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 305 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | ▶ | return $self->count? $self->imageA->[-1]->number: 0; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 307 | } | ||||||||||||||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||||||||||||
| 309 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 310 | |||||||||||||||||||||||||||||||||||||||||||
| 311 | =head2 Bildnummern | ||||||||||||||||||||||||||||||||||||||||||
| 312 | |||||||||||||||||||||||||||||||||||||||||||
| 313 | =head3 numbers() - Bildnummern-Ausdruck zu Bildnummern-Liste | ||||||||||||||||||||||||||||||||||||||||||
| 314 | |||||||||||||||||||||||||||||||||||||||||||
| 315 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 316 | |||||||||||||||||||||||||||||||||||||||||||
| 317 | @numbers|$numberA = $tdr->numbers($expr); | ||||||||||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||||||||||
| 319 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 320 | |||||||||||||||||||||||||||||||||||||||||||
| 321 | Liste von Bildnummern (Integer). Im Skalarkontext eine Referenz | ||||||||||||||||||||||||||||||||||||||||||
| 322 | auf die Liste. | ||||||||||||||||||||||||||||||||||||||||||
| 323 | |||||||||||||||||||||||||||||||||||||||||||
| 324 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 325 | |||||||||||||||||||||||||||||||||||||||||||
| 326 | Liefere die Liste der Bildnummern zu Bildnummern-Ausdruck $expr. | ||||||||||||||||||||||||||||||||||||||||||
| 327 | |||||||||||||||||||||||||||||||||||||||||||
| 328 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||||||||||||||||||
| 330 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | ▶ | sub numbers { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
numbers: not called CC=10 SCAR=47.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | my ($self,$expr) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||||||||||||||||
| 335 | 0 | my $debug = 0; | |||||||||||||||||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||||||||||||||||||
| 337 | # 1. Bezeichner auflösen (anschließend enthält $expr | ||||||||||||||||||||||||||||||||||||||||||
| 338 | # keine Bezeichner mehr) | ||||||||||||||||||||||||||||||||||||||||||
| 339 | |||||||||||||||||||||||||||||||||||||||||||
| 340 | 0 | while (1) { | |||||||||||||||||||||||||||||||||||||||||
| 341 | 0 | ▶ | if ($debug) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 342 | 0 | printf "%d - %21s: %s\n",1,'Expression',$expr; | |||||||||||||||||||||||||||||||||||||||||
| 343 | } | ||||||||||||||||||||||||||||||||||||||||||
| 344 | 0 | my $r = $expr =~ s/([-\w]*[a-zA-Z][-\w]*)(?![-\w]*\()/ | |||||||||||||||||||||||||||||||||||||||||
| 345 | 0 | $self->resolveIdentifier($1)/eg; | |||||||||||||||||||||||||||||||||||||||||
| 346 | 0 | ▶ | if (!$r) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 347 | 0 | last; | |||||||||||||||||||||||||||||||||||||||||
| 348 | } | ||||||||||||||||||||||||||||||||||||||||||
| 349 | } | ||||||||||||||||||||||||||||||||||||||||||
| 350 | |||||||||||||||||||||||||||||||||||||||||||
| 351 | # 2. Bereichsangaben auflösen (anschließend enthält $expr | ||||||||||||||||||||||||||||||||||||||||||
| 352 | # keine Bereichsangaben mehr) | ||||||||||||||||||||||||||||||||||||||||||
| 353 | |||||||||||||||||||||||||||||||||||||||||||
| 354 | 0 | while (1) { | |||||||||||||||||||||||||||||||||||||||||
| 355 | 0 | ▶ | if ($debug) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 356 | 0 | printf "%d - %21s: %s\n",2,'Identifiers resolved',$expr; | |||||||||||||||||||||||||||||||||||||||||
| 357 | } | ||||||||||||||||||||||||||||||||||||||||||
| 358 | 0 | my $r = $expr =~ s/(^|[\s\(,])(\d+)-(\d+)($|[\s)])/ | |||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | $1.$self->resolveRange($2,$3).$4/eg; | |||||||||||||||||||||||||||||||||||||||||
| 360 | 0 | ▶ | if (!$r) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 361 | 0 | last; | |||||||||||||||||||||||||||||||||||||||||
| 362 | } | ||||||||||||||||||||||||||||||||||||||||||
| 363 | } | ||||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||||
| 365 | # 3. Funktionen auflösen (anschließend besteht $expr | ||||||||||||||||||||||||||||||||||||||||||
| 366 | # nur noch aus Bildnummern) | ||||||||||||||||||||||||||||||||||||||||||
| 367 | |||||||||||||||||||||||||||||||||||||||||||
| 368 | 0 | while (1) { | |||||||||||||||||||||||||||||||||||||||||
| 369 | 0 | ▶ | if ($debug) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 370 | 0 | printf "%d - %21s: %s\n",3,'Ranges resolved',$expr; | |||||||||||||||||||||||||||||||||||||||||
| 371 | } | ||||||||||||||||||||||||||||||||||||||||||
| 372 | 0 | my $r = $expr =~ s/([a-zA-Z]+)\(([^()]*)\)/ | |||||||||||||||||||||||||||||||||||||||||
| 373 | 0 | $self->resolveFunctionExpression($1,$2)/eg; | |||||||||||||||||||||||||||||||||||||||||
| 374 | 0 | ▶ | if (!$r) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 375 | 0 | last; | |||||||||||||||||||||||||||||||||||||||||
| 376 | } | ||||||||||||||||||||||||||||||||||||||||||
| 377 | } | ||||||||||||||||||||||||||||||||||||||||||
| 378 | 0 | ▶ | if ($debug) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 379 | 0 | printf "%d - %21s: %s\n",4,'Functions applied',$expr; | |||||||||||||||||||||||||||||||||||||||||
| 380 | } | ||||||||||||||||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||||||||||||||||
| 382 | # 4. Bildnummern-Liste erzeugen | ||||||||||||||||||||||||||||||||||||||||||
| 383 | |||||||||||||||||||||||||||||||||||||||||||
| 384 | 0 | $expr =~ s/^\s+//; | |||||||||||||||||||||||||||||||||||||||||
| 385 | 0 | $expr =~ s/\s+$//; | |||||||||||||||||||||||||||||||||||||||||
| 386 | 0 | my @numbers = split /\s+/,$expr; | |||||||||||||||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | ▶ | if ($debug) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 389 | 0 | printf "%d - %21s: %s\n",5,'Existent numbers only',join(' ',@numbers); | |||||||||||||||||||||||||||||||||||||||||
| 390 | } | ||||||||||||||||||||||||||||||||||||||||||
| 391 | 0 | ▶ | return wantarray? @numbers: \@numbers; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 392 | } | ||||||||||||||||||||||||||||||||||||||||||
| 393 | |||||||||||||||||||||||||||||||||||||||||||
| 394 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||||||||||||||||||
| 396 | =head3 resolveFunctionExpression() - Wende Funktion an | ||||||||||||||||||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||||||||||||||||||
| 398 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||||||||||||||||
| 400 | $str = $tdr->resolveFunctionExpression($name,$args); | ||||||||||||||||||||||||||||||||||||||||||
| 401 | |||||||||||||||||||||||||||||||||||||||||||
| 402 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 403 | |||||||||||||||||||||||||||||||||||||||||||
| 404 | Zeichenkette | ||||||||||||||||||||||||||||||||||||||||||
| 405 | |||||||||||||||||||||||||||||||||||||||||||
| 406 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 407 | |||||||||||||||||||||||||||||||||||||||||||
| 408 | Wende Funktion $func auf seine Argumente $args an und liefere die | ||||||||||||||||||||||||||||||||||||||||||
| 409 | resultierende Zeichenkette (Bildnummern-Aufzählung) zurück. | ||||||||||||||||||||||||||||||||||||||||||
| 410 | |||||||||||||||||||||||||||||||||||||||||||
| 411 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 412 | |||||||||||||||||||||||||||||||||||||||||||
| 413 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 414 | |||||||||||||||||||||||||||||||||||||||||||
| 415 | 0 | ▶ | sub resolveFunctionExpression { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
resolveFunctionExpression: not called CC=15 SCAR=54.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 416 | 0 | my ($self,$func,$args) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 417 | |||||||||||||||||||||||||||||||||||||||||||
| 418 | 0 | my @args = split /,/,$args; | |||||||||||||||||||||||||||||||||||||||||
| 419 | 0 | my @numbers = split /\s+/,pop @args; | |||||||||||||||||||||||||||||||||||||||||
| 420 | |||||||||||||||||||||||||||||||||||||||||||
| 421 | 0 | ▶ | if ($func eq 'duplicate') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 422 | 0 | ▶ | my $n = shift @args || 2; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift @args || 2
MC/DC0%0/1
shift @args || 2
shift @args
Truth table0%0/2
A
A= shift @args
| |||||||||||||||||||||||||||||||||||||||||||
| 423 | 0 | ▶ | for (my $i = 0; $i < @numbers; $i += $n) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 424 | 0 | ▶ | for (my $j = 1; $j < $n; $j++) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 425 | 0 | splice @numbers,$i+$j,0,$numbers[$i]; | |||||||||||||||||||||||||||||||||||||||||
| 426 | } | ||||||||||||||||||||||||||||||||||||||||||
| 427 | } | ||||||||||||||||||||||||||||||||||||||||||
| 428 | } | ||||||||||||||||||||||||||||||||||||||||||
| 429 | elsif ($func eq 'randomize') { | ||||||||||||||||||||||||||||||||||||||||||
| 430 | 0 | ▶ | my $n = shift @args || scalar @numbers; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift @args || scalar @numbers
MC/DC0%0/1
shift @args || scalar @numbers
shift @args
Truth table0%0/2
A
A= shift @args
| |||||||||||||||||||||||||||||||||||||||||||
| 431 | |||||||||||||||||||||||||||||||||||||||||||
| 432 | 0 | my @arr; | |||||||||||||||||||||||||||||||||||||||||
| 433 | 0 | my $size = scalar @numbers; | |||||||||||||||||||||||||||||||||||||||||
| 434 | 0 | ▶ | for (my $i = 0; $i < $n; $i++) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 435 | 0 | my $m = int rand scalar $size; | |||||||||||||||||||||||||||||||||||||||||
| 436 | 0 | ▶ | if ($size > 1 && @arr && $numbers[$m] == $arr[-1]) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$size > 1 and @arr and $numbers[$m] == $arr[-1]
$size > 1 and @arr
MC/DC0%0/3
$size > 1 and @arr and $numbers[$m] == $arr[-1]
$size > 1
@arr
$numbers[$m] == $arr[-1]
Truth table0%0/4
A and B and C
A= $size > 1B= @arrC= $numbers[$m] == $arr[-1]
| |||||||||||||||||||||||||||||||||||||||||||
| 437 | 0 | redo; | |||||||||||||||||||||||||||||||||||||||||
| 438 | } | ||||||||||||||||||||||||||||||||||||||||||
| 439 | 0 | push @arr,$numbers[$m]; | |||||||||||||||||||||||||||||||||||||||||
| 440 | } | ||||||||||||||||||||||||||||||||||||||||||
| 441 | 0 | @numbers = @arr; | |||||||||||||||||||||||||||||||||||||||||
| 442 | } | ||||||||||||||||||||||||||||||||||||||||||
| 443 | elsif ($func eq 'repeat') { | ||||||||||||||||||||||||||||||||||||||||||
| 444 | 0 | ▶ | my $n = shift @args || 2; | ||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
shift @args || 2
MC/DC0%0/1
shift @args || 2
shift @args
Truth table0%0/2
A
A= shift @args
| |||||||||||||||||||||||||||||||||||||||||||
| 445 | 0 | ▶ | for (my $i = 1; $i < $n; $i++) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 446 | 0 | push @numbers,@numbers; | |||||||||||||||||||||||||||||||||||||||||
| 447 | } | ||||||||||||||||||||||||||||||||||||||||||
| 448 | } | ||||||||||||||||||||||||||||||||||||||||||
| 449 | elsif ($func eq 'reverse') { | ||||||||||||||||||||||||||||||||||||||||||
| 450 | 0 | @numbers = reverse @numbers; | |||||||||||||||||||||||||||||||||||||||||
| 451 | } | ||||||||||||||||||||||||||||||||||||||||||
| 452 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 453 | 0 | $self->throw( | |||||||||||||||||||||||||||||||||||||||||
| 454 | 'TIMELAPSE-00001: Unknown function', | ||||||||||||||||||||||||||||||||||||||||||
| 455 | Function => $func, | ||||||||||||||||||||||||||||||||||||||||||
| 456 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 457 | } | ||||||||||||||||||||||||||||||||||||||||||
| 458 | |||||||||||||||||||||||||||||||||||||||||||
| 459 | 0 | return join ' ',@numbers; | |||||||||||||||||||||||||||||||||||||||||
| 460 | } | ||||||||||||||||||||||||||||||||||||||||||
| 461 | |||||||||||||||||||||||||||||||||||||||||||
| 462 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 463 | |||||||||||||||||||||||||||||||||||||||||||
| 464 | =head3 resolveIdentifier() - Wert eines Clip- oder Range-Bezeichners | ||||||||||||||||||||||||||||||||||||||||||
| 465 | |||||||||||||||||||||||||||||||||||||||||||
| 466 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 467 | |||||||||||||||||||||||||||||||||||||||||||
| 468 | $str = $tdr->resolveIdentifier($key); | ||||||||||||||||||||||||||||||||||||||||||
| 469 | |||||||||||||||||||||||||||||||||||||||||||
| 470 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 471 | |||||||||||||||||||||||||||||||||||||||||||
| 472 | Zeichenkette | ||||||||||||||||||||||||||||||||||||||||||
| 473 | |||||||||||||||||||||||||||||||||||||||||||
| 474 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 475 | |||||||||||||||||||||||||||||||||||||||||||
| 476 | Liefere den Wert des Bezeichners $key. | ||||||||||||||||||||||||||||||||||||||||||
| 477 | |||||||||||||||||||||||||||||||||||||||||||
| 478 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 479 | |||||||||||||||||||||||||||||||||||||||||||
| 480 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 481 | |||||||||||||||||||||||||||||||||||||||||||
| 482 | 0 | ▶ | sub resolveIdentifier { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
resolveIdentifier: not called CC=17 SCAR=57.2
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 483 | 0 | my ($self,$key) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 484 | |||||||||||||||||||||||||||||||||||||||||||
| 485 | # Range-Definitionen | ||||||||||||||||||||||||||||||||||||||||||
| 486 | 0 | my $trd = $self->rangeDef; | |||||||||||||||||||||||||||||||||||||||||
| 487 | |||||||||||||||||||||||||||||||||||||||||||
| 488 | 0 | my @arr; | |||||||||||||||||||||||||||||||||||||||||
| 489 | 0 | ▶ | if ($key eq 'all') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 5 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 490 | # Die Nummern aller Bilder des Zeitraffer-Verzeichnisses | ||||||||||||||||||||||||||||||||||||||||||
| 491 | |||||||||||||||||||||||||||||||||||||||||||
| 492 | 0 | for my $img (@{$self->{'imageA'}}) { | |||||||||||||||||||||||||||||||||||||||||
| 493 | 0 | push @arr,$img->number; | |||||||||||||||||||||||||||||||||||||||||
| 494 | } | ||||||||||||||||||||||||||||||||||||||||||
| 495 | } | ||||||||||||||||||||||||||||||||||||||||||
| 496 | elsif ($key eq 'used') { | ||||||||||||||||||||||||||||||||||||||||||
| 497 | # Alle Range-Bezeichner. Wenn keine Range-Datei existiert, | ||||||||||||||||||||||||||||||||||||||||||
| 498 | # leere Liste. | ||||||||||||||||||||||||||||||||||||||||||
| 499 | |||||||||||||||||||||||||||||||||||||||||||
| 500 | 0 | for my $key ($trd->rangeKeys) { | |||||||||||||||||||||||||||||||||||||||||
| 501 | 0 | push @arr,$key; | |||||||||||||||||||||||||||||||||||||||||
| 502 | } | ||||||||||||||||||||||||||||||||||||||||||
| 503 | } | ||||||||||||||||||||||||||||||||||||||||||
| 504 | elsif ($key eq 'unused') { | ||||||||||||||||||||||||||||||||||||||||||
| 505 | # Alle Bilder des Zeitraffer-Verzeichnisses, die in keinem | ||||||||||||||||||||||||||||||||||||||||||
| 506 | # Range auftauchen. Wenn keine Range-Datei existiert, leere | ||||||||||||||||||||||||||||||||||||||||||
| 507 | # Liste. | ||||||||||||||||||||||||||||||||||||||||||
| 508 | |||||||||||||||||||||||||||||||||||||||||||
| 509 | 0 | ▶ | if ($trd->rangeCount) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 510 | # Hash mit allen genutzten Bildern | ||||||||||||||||||||||||||||||||||||||||||
| 511 | |||||||||||||||||||||||||||||||||||||||||||
| 512 | 0 | my %used; | |||||||||||||||||||||||||||||||||||||||||
| 513 | 0 | for my $n ($self->numbers('used')) { | |||||||||||||||||||||||||||||||||||||||||
| 514 | 0 | $used{$n}++; | |||||||||||||||||||||||||||||||||||||||||
| 515 | } | ||||||||||||||||||||||||||||||||||||||||||
| 516 | |||||||||||||||||||||||||||||||||||||||||||
| 517 | # Liste der nicht-genutzten Bilder aufbauen | ||||||||||||||||||||||||||||||||||||||||||
| 518 | |||||||||||||||||||||||||||||||||||||||||||
| 519 | 0 | for my $img (@{$self->{'imageA'}}) { | |||||||||||||||||||||||||||||||||||||||||
| 520 | 0 | my $n = $img->number; | |||||||||||||||||||||||||||||||||||||||||
| 521 | 0 | ▶ | if (!$used{$n}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 522 | 0 | push @arr,$n | |||||||||||||||||||||||||||||||||||||||||
| 523 | } | ||||||||||||||||||||||||||||||||||||||||||
| 524 | } | ||||||||||||||||||||||||||||||||||||||||||
| 525 | } | ||||||||||||||||||||||||||||||||||||||||||
| 526 | } | ||||||||||||||||||||||||||||||||||||||||||
| 527 | elsif ($key eq 'junk') { | ||||||||||||||||||||||||||||||||||||||||||
| 528 | 0 | ▶ | if (my $expr = $trd->{'junkExpr'}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 529 | # Hash mit allen genutzten Bildern | ||||||||||||||||||||||||||||||||||||||||||
| 530 | |||||||||||||||||||||||||||||||||||||||||||
| 531 | 0 | my %used; | |||||||||||||||||||||||||||||||||||||||||
| 532 | 0 | for my $n ($self->numbers('used')) { | |||||||||||||||||||||||||||||||||||||||||
| 533 | 0 | $used{$n}++; | |||||||||||||||||||||||||||||||||||||||||
| 534 | } | ||||||||||||||||||||||||||||||||||||||||||
| 535 | |||||||||||||||||||||||||||||||||||||||||||
| 536 | # Liste der Junk-Bilder, die nicht in %used vorkommen | ||||||||||||||||||||||||||||||||||||||||||
| 537 | |||||||||||||||||||||||||||||||||||||||||||
| 538 | 0 | for my $n ($self->numbers($expr)) { | |||||||||||||||||||||||||||||||||||||||||
| 539 | 0 | ▶ | if (!$used{$n}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 540 | 0 | push @arr,$n | |||||||||||||||||||||||||||||||||||||||||
| 541 | } | ||||||||||||||||||||||||||||||||||||||||||
| 542 | } | ||||||||||||||||||||||||||||||||||||||||||
| 543 | |||||||||||||||||||||||||||||||||||||||||||
| 544 | # Bildnummern aufsteigend sortieren | ||||||||||||||||||||||||||||||||||||||||||
| 545 | 0 | @arr = sort {$a <=> $b} @arr; | |||||||||||||||||||||||||||||||||||||||||
| 546 | } | ||||||||||||||||||||||||||||||||||||||||||
| 547 | } | ||||||||||||||||||||||||||||||||||||||||||
| 548 | elsif (defined(my $expr = $trd->expression($key))) { | ||||||||||||||||||||||||||||||||||||||||||
| 549 | 0 | ▶ | if ($expr) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 550 | 0 | push @arr,$expr; | |||||||||||||||||||||||||||||||||||||||||
| 551 | } | ||||||||||||||||||||||||||||||||||||||||||
| 552 | } | ||||||||||||||||||||||||||||||||||||||||||
| 553 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 554 | 0 | $self->throw( | |||||||||||||||||||||||||||||||||||||||||
| 555 | 'TIMELAPSE-00001: Unknown identifier', | ||||||||||||||||||||||||||||||||||||||||||
| 556 | Key => $key, | ||||||||||||||||||||||||||||||||||||||||||
| 557 | Directory => $self->dir, | ||||||||||||||||||||||||||||||||||||||||||
| 558 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 559 | } | ||||||||||||||||||||||||||||||||||||||||||
| 560 | |||||||||||||||||||||||||||||||||||||||||||
| 561 | 0 | return join ' ',@arr; | |||||||||||||||||||||||||||||||||||||||||
| 562 | } | ||||||||||||||||||||||||||||||||||||||||||
| 563 | |||||||||||||||||||||||||||||||||||||||||||
| 564 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 565 | |||||||||||||||||||||||||||||||||||||||||||
| 566 | =head3 resolveRange() - Löse Bildnummern-Bereichsangabe auf | ||||||||||||||||||||||||||||||||||||||||||
| 567 | |||||||||||||||||||||||||||||||||||||||||||
| 568 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 569 | |||||||||||||||||||||||||||||||||||||||||||
| 570 | $str = $tdr->resolveRange($n,$m); | ||||||||||||||||||||||||||||||||||||||||||
| 571 | |||||||||||||||||||||||||||||||||||||||||||
| 572 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 573 | |||||||||||||||||||||||||||||||||||||||||||
| 574 | Aufzählung von Bildnummern als Zeichenkette | ||||||||||||||||||||||||||||||||||||||||||
| 575 | |||||||||||||||||||||||||||||||||||||||||||
| 576 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 577 | |||||||||||||||||||||||||||||||||||||||||||
| 578 | Überführe eine Bildnummern-Bereichsangabe ("N-M") in eine | ||||||||||||||||||||||||||||||||||||||||||
| 579 | Nummern-Aufzählung ("N ... M"). | ||||||||||||||||||||||||||||||||||||||||||
| 580 | |||||||||||||||||||||||||||||||||||||||||||
| 581 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 582 | |||||||||||||||||||||||||||||||||||||||||||
| 583 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 584 | |||||||||||||||||||||||||||||||||||||||||||
| 585 | 0 | ▶ | sub resolveRange { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
resolveRange: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 586 | 0 | my ($self,$n,$m) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 587 | |||||||||||||||||||||||||||||||||||||||||||
| 588 | 0 | my $str = ''; | |||||||||||||||||||||||||||||||||||||||||
| 589 | 0 | ▶ | for (my $i = $n; $i <= $m; $i++) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 590 | 0 | ▶ | if ($str) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 591 | 0 | $str .= ' '; | |||||||||||||||||||||||||||||||||||||||||
| 592 | } | ||||||||||||||||||||||||||||||||||||||||||
| 593 | 0 | $str .= $i; | |||||||||||||||||||||||||||||||||||||||||
| 594 | } | ||||||||||||||||||||||||||||||||||||||||||
| 595 | |||||||||||||||||||||||||||||||||||||||||||
| 596 | 0 | return $str; | |||||||||||||||||||||||||||||||||||||||||
| 597 | } | ||||||||||||||||||||||||||||||||||||||||||
| 598 | |||||||||||||||||||||||||||||||||||||||||||
| 599 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 600 | |||||||||||||||||||||||||||||||||||||||||||
| 601 | =head2 Bilddateien | ||||||||||||||||||||||||||||||||||||||||||
| 602 | |||||||||||||||||||||||||||||||||||||||||||
| 603 | =head3 images() - Folge von Bilddatei-Objekten | ||||||||||||||||||||||||||||||||||||||||||
| 604 | |||||||||||||||||||||||||||||||||||||||||||
| 605 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 606 | |||||||||||||||||||||||||||||||||||||||||||
| 607 | @images|$imageA = $tdr->images; | ||||||||||||||||||||||||||||||||||||||||||
| 608 | @images|$imageA = $tdr->images($expr); | ||||||||||||||||||||||||||||||||||||||||||
| 609 | |||||||||||||||||||||||||||||||||||||||||||
| 610 | =head4 Arguments | ||||||||||||||||||||||||||||||||||||||||||
| 611 | |||||||||||||||||||||||||||||||||||||||||||
| 612 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 613 | |||||||||||||||||||||||||||||||||||||||||||
| 614 | =item $expr | ||||||||||||||||||||||||||||||||||||||||||
| 615 | |||||||||||||||||||||||||||||||||||||||||||
| 616 | Bildfolgen-Ausdruck. | ||||||||||||||||||||||||||||||||||||||||||
| 617 | |||||||||||||||||||||||||||||||||||||||||||
| 618 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 619 | |||||||||||||||||||||||||||||||||||||||||||
| 620 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 621 | |||||||||||||||||||||||||||||||||||||||||||
| 622 | Liste von Bilddatei-Objekten. Im Skalarkontext liefere eine | ||||||||||||||||||||||||||||||||||||||||||
| 623 | Referenz auf die Liste. | ||||||||||||||||||||||||||||||||||||||||||
| 624 | |||||||||||||||||||||||||||||||||||||||||||
| 625 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 626 | |||||||||||||||||||||||||||||||||||||||||||
| 627 | Liefere eine Folge von Bilddatei-Objekten gemäß | ||||||||||||||||||||||||||||||||||||||||||
| 628 | Bildfolgen-Ausdruck $expr. Ist kein Bildfolgen-Ausdruck angegeben, | ||||||||||||||||||||||||||||||||||||||||||
| 629 | liefere alle Bilddatei-Objekte. Ist eine Range-Datei definiert, | ||||||||||||||||||||||||||||||||||||||||||
| 630 | bedeutet "alle", alle I<genutzten> Bilder (= 'used'), ansonsten | ||||||||||||||||||||||||||||||||||||||||||
| 631 | ausnahmslos alle Bilder des Zeitraffer-Verzeichnisses (= 'all'). | ||||||||||||||||||||||||||||||||||||||||||
| 632 | |||||||||||||||||||||||||||||||||||||||||||
| 633 | Die Methode cached ihre Ergebnisse, so dass jede Bildfolge nur | ||||||||||||||||||||||||||||||||||||||||||
| 634 | einmal bestimmt wird. | ||||||||||||||||||||||||||||||||||||||||||
| 635 | |||||||||||||||||||||||||||||||||||||||||||
| 636 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 637 | |||||||||||||||||||||||||||||||||||||||||||
| 638 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 639 | |||||||||||||||||||||||||||||||||||||||||||
| 640 | 3 | my %ImageSequence; | |||||||||||||||||||||||||||||||||||||||||
| 641 | |||||||||||||||||||||||||||||||||||||||||||
| 642 | 0 | ▶ | sub images { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
images: not called CC=7 SCAR=40.3
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 643 | 0 | my $self = shift; | |||||||||||||||||||||||||||||||||||||||||
| 644 | 0 | ▶ | my $expr = shift || ($self->rangeDef->rangeCount? 'used': 'all'); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
shift() || ($self->rangeDef->rangeCount ? 'used' : 'all')
MC/DC0%0/2
shift() || ($self->rangeDef->rangeCount ? 'used' : 'all')
shift()
($self->rangeDef->rangeCount ? 'used' : 'all')
Truth table0%0/3
A || B
A= shift()B= ($self->rangeDef->rangeCount ? 'used' : 'all')
| |||||||||||||||||||||||||||||||||||||||||||
| 645 | |||||||||||||||||||||||||||||||||||||||||||
| 646 | 0 | my $imageA = $ImageSequence{$expr}; | |||||||||||||||||||||||||||||||||||||||||
| 647 | 0 | ▶ | if (!$imageA) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 648 | 0 | my @images; | |||||||||||||||||||||||||||||||||||||||||
| 649 | 0 | for my $n ($self->numbers($expr)) { | |||||||||||||||||||||||||||||||||||||||||
| 650 | 0 | ▶ | if (my $img = $self->image($n)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 651 | 0 | push @images,$img; | |||||||||||||||||||||||||||||||||||||||||
| 652 | } | ||||||||||||||||||||||||||||||||||||||||||
| 653 | } | ||||||||||||||||||||||||||||||||||||||||||
| 654 | 0 | $imageA = $ImageSequence{$expr} = \@images; | |||||||||||||||||||||||||||||||||||||||||
| 655 | } | ||||||||||||||||||||||||||||||||||||||||||
| 656 | |||||||||||||||||||||||||||||||||||||||||||
| 657 | 0 | ▶ | return wantarray? @$imageA: $imageA; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 658 | } | ||||||||||||||||||||||||||||||||||||||||||
| 659 | |||||||||||||||||||||||||||||||||||||||||||
| 660 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 661 | |||||||||||||||||||||||||||||||||||||||||||
| 662 | =head3 image() - Lookup Bilddatei-Objekt nach Bild-Nummer | ||||||||||||||||||||||||||||||||||||||||||
| 663 | |||||||||||||||||||||||||||||||||||||||||||
| 664 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 665 | |||||||||||||||||||||||||||||||||||||||||||
| 666 | $img = $tdr->image($n); | ||||||||||||||||||||||||||||||||||||||||||
| 667 | |||||||||||||||||||||||||||||||||||||||||||
| 668 | =head4 Arguments | ||||||||||||||||||||||||||||||||||||||||||
| 669 | |||||||||||||||||||||||||||||||||||||||||||
| 670 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 671 | |||||||||||||||||||||||||||||||||||||||||||
| 672 | =item $n | ||||||||||||||||||||||||||||||||||||||||||
| 673 | |||||||||||||||||||||||||||||||||||||||||||
| 674 | Bild-Nummer | ||||||||||||||||||||||||||||||||||||||||||
| 675 | |||||||||||||||||||||||||||||||||||||||||||
| 676 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 677 | |||||||||||||||||||||||||||||||||||||||||||
| 678 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 679 | |||||||||||||||||||||||||||||||||||||||||||
| 680 | Bild-Objekt oder C<undef>. | ||||||||||||||||||||||||||||||||||||||||||
| 681 | |||||||||||||||||||||||||||||||||||||||||||
| 682 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 683 | |||||||||||||||||||||||||||||||||||||||||||
| 684 | Liefere das Bild-Objekt mit Bild-Nummer $n. Existiert keine | ||||||||||||||||||||||||||||||||||||||||||
| 685 | Bild-Objekt mit Nummer $n, liefere undef. | ||||||||||||||||||||||||||||||||||||||||||
| 686 | |||||||||||||||||||||||||||||||||||||||||||
| 687 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 688 | |||||||||||||||||||||||||||||||||||||||||||
| 689 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 690 | |||||||||||||||||||||||||||||||||||||||||||
| 691 | 0 | ▶ | sub image { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
image: not called CC=4 SCAR=30.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 692 | 0 | my ($self,$n) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 693 | |||||||||||||||||||||||||||||||||||||||||||
| 694 | # Wir prüfen auf korrekten Integer-Wert | ||||||||||||||||||||||||||||||||||||||||||
| 695 | |||||||||||||||||||||||||||||||||||||||||||
| 696 | 0 | ▶ | if ($n !~ /^\d+$/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 697 | 0 | ▶ | $self->throw( | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||
| 698 | 'TIMELAPSE-00001: Not an integer', | ||||||||||||||||||||||||||||||||||||||||||
| 699 | Key => !defined $n? 'undef': $n eq ''? "''": $n, | ||||||||||||||||||||||||||||||||||||||||||
| 700 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 701 | } | ||||||||||||||||||||||||||||||||||||||||||
| 702 | |||||||||||||||||||||||||||||||||||||||||||
| 703 | 0 | return $self->{'imageH'}->{$n}; | |||||||||||||||||||||||||||||||||||||||||
| 704 | } | ||||||||||||||||||||||||||||||||||||||||||
| 705 | |||||||||||||||||||||||||||||||||||||||||||
| 706 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 707 | |||||||||||||||||||||||||||||||||||||||||||
| 708 | =head2 Operationen | ||||||||||||||||||||||||||||||||||||||||||
| 709 | |||||||||||||||||||||||||||||||||||||||||||
| 710 | =head3 importImages() - Importiere Bilddateien in Zeitraffer-Verzeichnis | ||||||||||||||||||||||||||||||||||||||||||
| 711 | |||||||||||||||||||||||||||||||||||||||||||
| 712 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 713 | |||||||||||||||||||||||||||||||||||||||||||
| 714 | $class->importImages($dir,$srcDir); | ||||||||||||||||||||||||||||||||||||||||||
| 715 | |||||||||||||||||||||||||||||||||||||||||||
| 716 | =head4 Arguments | ||||||||||||||||||||||||||||||||||||||||||
| 717 | |||||||||||||||||||||||||||||||||||||||||||
| 718 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 719 | |||||||||||||||||||||||||||||||||||||||||||
| 720 | =item $dir | ||||||||||||||||||||||||||||||||||||||||||
| 721 | |||||||||||||||||||||||||||||||||||||||||||
| 722 | Zeitraffer-Verzeichnis, in das importiert wird. | ||||||||||||||||||||||||||||||||||||||||||
| 723 | |||||||||||||||||||||||||||||||||||||||||||
| 724 | =item $srcDir | ||||||||||||||||||||||||||||||||||||||||||
| 725 | |||||||||||||||||||||||||||||||||||||||||||
| 726 | Quell-Verzeichnisstruktur mit den Bildern, die importiert werden. | ||||||||||||||||||||||||||||||||||||||||||
| 727 | |||||||||||||||||||||||||||||||||||||||||||
| 728 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 729 | |||||||||||||||||||||||||||||||||||||||||||
| 730 | =head4 Options | ||||||||||||||||||||||||||||||||||||||||||
| 731 | |||||||||||||||||||||||||||||||||||||||||||
| 732 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 733 | |||||||||||||||||||||||||||||||||||||||||||
| 734 | =item -reorganize => $bool (Default: 0) | ||||||||||||||||||||||||||||||||||||||||||
| 735 | |||||||||||||||||||||||||||||||||||||||||||
| 736 | Rufe Methode reorganize() | ||||||||||||||||||||||||||||||||||||||||||
| 737 | |||||||||||||||||||||||||||||||||||||||||||
| 738 | =item -sort => 'name'|'mtime' (Default: 'name') | ||||||||||||||||||||||||||||||||||||||||||
| 739 | |||||||||||||||||||||||||||||||||||||||||||
| 740 | Sortierung der Bilddateien vor dem Import. Entweder nach Name | ||||||||||||||||||||||||||||||||||||||||||
| 741 | ('name') oder nach letzter Änderung und sekundär Name | ||||||||||||||||||||||||||||||||||||||||||
| 742 | ('mtime'). Letzeres ist beim Import von GoPro-Bildern wichtig. | ||||||||||||||||||||||||||||||||||||||||||
| 743 | |||||||||||||||||||||||||||||||||||||||||||
| 744 | =item -subDir => $subPath (Default: undef) | ||||||||||||||||||||||||||||||||||||||||||
| 745 | |||||||||||||||||||||||||||||||||||||||||||
| 746 | Importiere die Bilder in das Zeitraffer-Subverzeichnis $subPath. | ||||||||||||||||||||||||||||||||||||||||||
| 747 | Existiert das Verzeichnis nicht, wird es angelegt. | ||||||||||||||||||||||||||||||||||||||||||
| 748 | |||||||||||||||||||||||||||||||||||||||||||
| 749 | =item -verbose => $bool (Default: 1) | ||||||||||||||||||||||||||||||||||||||||||
| 750 | |||||||||||||||||||||||||||||||||||||||||||
| 751 | Gibt Laufzeitinformation auf STDOUT aus. | ||||||||||||||||||||||||||||||||||||||||||
| 752 | |||||||||||||||||||||||||||||||||||||||||||
| 753 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 754 | |||||||||||||||||||||||||||||||||||||||||||
| 755 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 756 | |||||||||||||||||||||||||||||||||||||||||||
| 757 | nichts | ||||||||||||||||||||||||||||||||||||||||||
| 758 | |||||||||||||||||||||||||||||||||||||||||||
| 759 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 760 | |||||||||||||||||||||||||||||||||||||||||||
| 761 | Füge die Bilddateien aus Verzeichnisstruktur $srcDir zum | ||||||||||||||||||||||||||||||||||||||||||
| 762 | Zeitraffer-Verzeichnis $dir hinzu. | ||||||||||||||||||||||||||||||||||||||||||
| 763 | |||||||||||||||||||||||||||||||||||||||||||
| 764 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 765 | |||||||||||||||||||||||||||||||||||||||||||
| 766 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 767 | |||||||||||||||||||||||||||||||||||||||||||
| 768 | 0 | ▶ | sub importImages { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
importImages: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 769 | 0 | my ($class,$dir,$srcDir) = splice @_,0,3; | |||||||||||||||||||||||||||||||||||||||||
| 770 | |||||||||||||||||||||||||||||||||||||||||||
| 771 | # Optionen | ||||||||||||||||||||||||||||||||||||||||||
| 772 | |||||||||||||||||||||||||||||||||||||||||||
| 773 | 0 | my $reorganize = 0; | |||||||||||||||||||||||||||||||||||||||||
| 774 | 0 | my $sort = 'name'; | |||||||||||||||||||||||||||||||||||||||||
| 775 | 0 | my $subDir = undef; | |||||||||||||||||||||||||||||||||||||||||
| 776 | 0 | my $verbose = 1; | |||||||||||||||||||||||||||||||||||||||||
| 777 | |||||||||||||||||||||||||||||||||||||||||||
| 778 | 0 | Quiq::Option->extract(\@_, | |||||||||||||||||||||||||||||||||||||||||
| 779 | -reorganize => \$reorganize, | ||||||||||||||||||||||||||||||||||||||||||
| 780 | -sort => \$sort, | ||||||||||||||||||||||||||||||||||||||||||
| 781 | -subdir => \$subDir, | ||||||||||||||||||||||||||||||||||||||||||
| 782 | -verbose => \$verbose, | ||||||||||||||||||||||||||||||||||||||||||
| 783 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 784 | |||||||||||||||||||||||||||||||||||||||||||
| 785 | # Operation ausführen | ||||||||||||||||||||||||||||||||||||||||||
| 786 | |||||||||||||||||||||||||||||||||||||||||||
| 787 | 0 | my $tdr = $class->new($dir); | |||||||||||||||||||||||||||||||||||||||||
| 788 | |||||||||||||||||||||||||||||||||||||||||||
| 789 | 0 | my @images = Quiq::Image->findImages( | |||||||||||||||||||||||||||||||||||||||||
| 790 | -sort => $sort, | ||||||||||||||||||||||||||||||||||||||||||
| 791 | -object => 'Quiq::File::Image', | ||||||||||||||||||||||||||||||||||||||||||
| 792 | $srcDir, | ||||||||||||||||||||||||||||||||||||||||||
| 793 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 794 | |||||||||||||||||||||||||||||||||||||||||||
| 795 | # Zielverzeichnis ist per Default das Zeitraffer-Verzeichnis | ||||||||||||||||||||||||||||||||||||||||||
| 796 | 0 | my $destDir = $dir; | |||||||||||||||||||||||||||||||||||||||||
| 797 | |||||||||||||||||||||||||||||||||||||||||||
| 798 | 0 | ▶ | if ($subDir) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 799 | # Subverzeichnis muss als relativer Pfad angegeben sein | ||||||||||||||||||||||||||||||||||||||||||
| 800 | |||||||||||||||||||||||||||||||||||||||||||
| 801 | 0 | ▶ | if ($subDir =~ m|^/|) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 802 | 0 | $class->throw( | |||||||||||||||||||||||||||||||||||||||||
| 803 | 'TIMEPAPSE-00001: Path of subdir must be relative', | ||||||||||||||||||||||||||||||||||||||||||
| 804 | Subdir => $subDir, | ||||||||||||||||||||||||||||||||||||||||||
| 805 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 806 | } | ||||||||||||||||||||||||||||||||||||||||||
| 807 | |||||||||||||||||||||||||||||||||||||||||||
| 808 | # Pfad Zeitraffer-Verzeichnis voranstellen | ||||||||||||||||||||||||||||||||||||||||||
| 809 | 0 | $destDir .= "/$subDir"; | |||||||||||||||||||||||||||||||||||||||||
| 810 | |||||||||||||||||||||||||||||||||||||||||||
| 811 | # Subverzeichnis anlegen, falls es nicht existiert | ||||||||||||||||||||||||||||||||||||||||||
| 812 | |||||||||||||||||||||||||||||||||||||||||||
| 813 | 0 | ▶ | if (!-d $destDir) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 814 | 0 | Quiq::Path->mkdir($destDir,-recursive=>1); | |||||||||||||||||||||||||||||||||||||||||
| 815 | } | ||||||||||||||||||||||||||||||||||||||||||
| 816 | } | ||||||||||||||||||||||||||||||||||||||||||
| 817 | |||||||||||||||||||||||||||||||||||||||||||
| 818 | 0 | my $max = $tdr->maxNumber; | |||||||||||||||||||||||||||||||||||||||||
| 819 | 0 | my $mode = 'copy'; | |||||||||||||||||||||||||||||||||||||||||
| 820 | |||||||||||||||||||||||||||||||||||||||||||
| 821 | 0 | my $pro = Quiq::Progress->new(scalar(@images), | |||||||||||||||||||||||||||||||||||||||||
| 822 | -show => $verbose, | ||||||||||||||||||||||||||||||||||||||||||
| 823 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 824 | 0 | my $i = 0; | |||||||||||||||||||||||||||||||||||||||||
| 825 | 0 | for my $img (@images) { | |||||||||||||||||||||||||||||||||||||||||
| 826 | 0 | $i++; | |||||||||||||||||||||||||||||||||||||||||
| 827 | 0 | my $destFile = sprintf '%s/%s',$destDir, | |||||||||||||||||||||||||||||||||||||||||
| 828 | Quiq::Image->standardName($max+$i,$img->width, | ||||||||||||||||||||||||||||||||||||||||||
| 829 | $img->height,$img->type,-name=>$img->basename); | ||||||||||||||||||||||||||||||||||||||||||
| 830 | 0 | print $pro->msg($i,'%s: i/n x% t/t(t) x/s: %s',$mode,$destFile); | |||||||||||||||||||||||||||||||||||||||||
| 831 | 0 | Quiq::Path->duplicate($mode,$img->path,$destFile, | |||||||||||||||||||||||||||||||||||||||||
| 832 | -preserve => 1, | ||||||||||||||||||||||||||||||||||||||||||
| 833 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 834 | } | ||||||||||||||||||||||||||||||||||||||||||
| 835 | 0 | print $pro->msg; | |||||||||||||||||||||||||||||||||||||||||
| 836 | |||||||||||||||||||||||||||||||||||||||||||
| 837 | 0 | ▶ | if ($reorganize) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 838 | 0 | $class->reorganize($dir); | |||||||||||||||||||||||||||||||||||||||||
| 839 | } | ||||||||||||||||||||||||||||||||||||||||||
| 840 | |||||||||||||||||||||||||||||||||||||||||||
| 841 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 842 | } | ||||||||||||||||||||||||||||||||||||||||||
| 843 | |||||||||||||||||||||||||||||||||||||||||||
| 844 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 845 | |||||||||||||||||||||||||||||||||||||||||||
| 846 | =head3 reorganize() - Reorganisiere Bilddateien | ||||||||||||||||||||||||||||||||||||||||||
| 847 | |||||||||||||||||||||||||||||||||||||||||||
| 848 | =head4 Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| 849 | |||||||||||||||||||||||||||||||||||||||||||
| 850 | $class->reorganize($dir,@opt); | ||||||||||||||||||||||||||||||||||||||||||
| 851 | |||||||||||||||||||||||||||||||||||||||||||
| 852 | =head4 Arguments | ||||||||||||||||||||||||||||||||||||||||||
| 853 | |||||||||||||||||||||||||||||||||||||||||||
| 854 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 855 | |||||||||||||||||||||||||||||||||||||||||||
| 856 | =item $dir | ||||||||||||||||||||||||||||||||||||||||||
| 857 | |||||||||||||||||||||||||||||||||||||||||||
| 858 | Pfad zum Zeitraffer-Verzeichnis. | ||||||||||||||||||||||||||||||||||||||||||
| 859 | |||||||||||||||||||||||||||||||||||||||||||
| 860 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 861 | |||||||||||||||||||||||||||||||||||||||||||
| 862 | =head4 Options | ||||||||||||||||||||||||||||||||||||||||||
| 863 | |||||||||||||||||||||||||||||||||||||||||||
| 864 | =over 4 | ||||||||||||||||||||||||||||||||||||||||||
| 865 | |||||||||||||||||||||||||||||||||||||||||||
| 866 | =item -dryRun => $bool (Default: 0) | ||||||||||||||||||||||||||||||||||||||||||
| 867 | |||||||||||||||||||||||||||||||||||||||||||
| 868 | Zeige Änderungen, führe sie aber nicht aus. | ||||||||||||||||||||||||||||||||||||||||||
| 869 | |||||||||||||||||||||||||||||||||||||||||||
| 870 | =back | ||||||||||||||||||||||||||||||||||||||||||
| 871 | |||||||||||||||||||||||||||||||||||||||||||
| 872 | =head4 Returns | ||||||||||||||||||||||||||||||||||||||||||
| 873 | |||||||||||||||||||||||||||||||||||||||||||
| 874 | nichts | ||||||||||||||||||||||||||||||||||||||||||
| 875 | |||||||||||||||||||||||||||||||||||||||||||
| 876 | =head4 Description | ||||||||||||||||||||||||||||||||||||||||||
| 877 | |||||||||||||||||||||||||||||||||||||||||||
| 878 | Reorganisiere die Bilddateien des Zeitraffer-Verzeichnisses, | ||||||||||||||||||||||||||||||||||||||||||
| 879 | indem sie nach ihrer Bildnummer auf Unterverzeichnisse mit | ||||||||||||||||||||||||||||||||||||||||||
| 880 | je 500 Bilddateien verteilt werden. | ||||||||||||||||||||||||||||||||||||||||||
| 881 | |||||||||||||||||||||||||||||||||||||||||||
| 882 | Es wird die Unterverzeichnisstruktur angelegt | ||||||||||||||||||||||||||||||||||||||||||
| 883 | |||||||||||||||||||||||||||||||||||||||||||
| 884 | 000001 (für Bilder mit Bildnummer 1 bis Bildnummer 500) | ||||||||||||||||||||||||||||||||||||||||||
| 885 | 000501 (Bildnummer 501 bis 1000) | ||||||||||||||||||||||||||||||||||||||||||
| 886 | 001001 (Bildnummer 1001 bis 1500) | ||||||||||||||||||||||||||||||||||||||||||
| 887 | usw. | ||||||||||||||||||||||||||||||||||||||||||
| 888 | |||||||||||||||||||||||||||||||||||||||||||
| 889 | und die Bilder in ihr Verzeichnis bewegt. Befindet sich eine Bilddatei | ||||||||||||||||||||||||||||||||||||||||||
| 890 | bereits im richtigen Verzeichnis, wird sie nicht bewegt. | ||||||||||||||||||||||||||||||||||||||||||
| 891 | |||||||||||||||||||||||||||||||||||||||||||
| 892 | Anschließend werden leere Verzeichnisse gelöscht. | ||||||||||||||||||||||||||||||||||||||||||
| 893 | |||||||||||||||||||||||||||||||||||||||||||
| 894 | Die Operation kann wiederholt angewendet werden, an einem bereits | ||||||||||||||||||||||||||||||||||||||||||
| 895 | reorganisierten Verzeichnis wird keine Änderung vorgenommen. | ||||||||||||||||||||||||||||||||||||||||||
| 896 | |||||||||||||||||||||||||||||||||||||||||||
| 897 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 898 | |||||||||||||||||||||||||||||||||||||||||||
| 899 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 900 | |||||||||||||||||||||||||||||||||||||||||||
| 901 | 0 | ▶ | sub reorganize { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
reorganize: not called CC=11 SCAR=48.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 902 | 0 | my ($class,$dir) = splice @_,0,2; | |||||||||||||||||||||||||||||||||||||||||
| 903 | # @_: @opt | ||||||||||||||||||||||||||||||||||||||||||
| 904 | |||||||||||||||||||||||||||||||||||||||||||
| 905 | 0 | my $dryRun = 0; | |||||||||||||||||||||||||||||||||||||||||
| 906 | |||||||||||||||||||||||||||||||||||||||||||
| 907 | 0 | Quiq::Option->extract(\@_, | |||||||||||||||||||||||||||||||||||||||||
| 908 | -dryRun => \$dryRun, | ||||||||||||||||||||||||||||||||||||||||||
| 909 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 910 | |||||||||||||||||||||||||||||||||||||||||||
| 911 | 0 | my $subDirSize = 500; | |||||||||||||||||||||||||||||||||||||||||
| 912 | 0 | my $mode = 'move'; | |||||||||||||||||||||||||||||||||||||||||
| 913 | |||||||||||||||||||||||||||||||||||||||||||
| 914 | # Instantiiere Verzeichnis-Objekt | ||||||||||||||||||||||||||||||||||||||||||
| 915 | 0 | my $tdr = $class->new($dir); | |||||||||||||||||||||||||||||||||||||||||
| 916 | |||||||||||||||||||||||||||||||||||||||||||
| 917 | # Hash mit genutzten Bildern | ||||||||||||||||||||||||||||||||||||||||||
| 918 | |||||||||||||||||||||||||||||||||||||||||||
| 919 | 0 | my %used; | |||||||||||||||||||||||||||||||||||||||||
| 920 | 0 | for my $img ($tdr->images('used')) { | |||||||||||||||||||||||||||||||||||||||||
| 921 | 0 | $used{$img->number}++; | |||||||||||||||||||||||||||||||||||||||||
| 922 | } | ||||||||||||||||||||||||||||||||||||||||||
| 923 | |||||||||||||||||||||||||||||||||||||||||||
| 924 | # Verteile die Bilddateien auf Subverzeichnisse | ||||||||||||||||||||||||||||||||||||||||||
| 925 | |||||||||||||||||||||||||||||||||||||||||||
| 926 | 0 | for my $img ($tdr->images('all')) { | |||||||||||||||||||||||||||||||||||||||||
| 927 | 0 | my $n = $img->number; | |||||||||||||||||||||||||||||||||||||||||
| 928 | |||||||||||||||||||||||||||||||||||||||||||
| 929 | 0 | ▶ | my $subDir = sprintf '%s/%s/%06d',$dir,$used{$n}? 'used': 'unused', | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 930 | int(($n-1)/$subDirSize)*$subDirSize+1; | ||||||||||||||||||||||||||||||||||||||||||
| 931 | 0 | ▶ | if (!-e $subDir) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 932 | 0 | ▶ | if (!$dryRun) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 933 | 0 | Quiq::Path->mkdir($subDir,-recursive=>1); | |||||||||||||||||||||||||||||||||||||||||
| 934 | } | ||||||||||||||||||||||||||||||||||||||||||
| 935 | 0 | print "$subDir - directory created\n"; | |||||||||||||||||||||||||||||||||||||||||
| 936 | } | ||||||||||||||||||||||||||||||||||||||||||
| 937 | |||||||||||||||||||||||||||||||||||||||||||
| 938 | 0 | my $srcFile = $img->path; | |||||||||||||||||||||||||||||||||||||||||
| 939 | 0 | my $destFile = sprintf '%s/%s',$subDir,$img->filename; | |||||||||||||||||||||||||||||||||||||||||
| 940 | 0 | ▶ | if ($destFile ne $srcFile) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 941 | 0 | print "$srcFile => $destFile\n"; | |||||||||||||||||||||||||||||||||||||||||
| 942 | 0 | ▶ | if (!$dryRun) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 943 | 0 | Quiq::Path->duplicate($mode,$srcFile,$destFile); | |||||||||||||||||||||||||||||||||||||||||
| 944 | } | ||||||||||||||||||||||||||||||||||||||||||
| 945 | } | ||||||||||||||||||||||||||||||||||||||||||
| 946 | } | ||||||||||||||||||||||||||||||||||||||||||
| 947 | |||||||||||||||||||||||||||||||||||||||||||
| 948 | # Überzählige Verzeichnisse löschen | ||||||||||||||||||||||||||||||||||||||||||
| 949 | |||||||||||||||||||||||||||||||||||||||||||
| 950 | 0 | for my $dir (sort Quiq::Path->find($dir,-type=>'d')) { | |||||||||||||||||||||||||||||||||||||||||
| 951 | 0 | ▶ | if (Quiq::Path->isEmpty($dir)) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 952 | 0 | ▶ | if (!$dryRun) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 953 | 0 | Quiq::Path->rmdir($dir); | |||||||||||||||||||||||||||||||||||||||||
| 954 | } | ||||||||||||||||||||||||||||||||||||||||||
| 955 | 0 | print "$dir - directory deleted\n"; | |||||||||||||||||||||||||||||||||||||||||
| 956 | } | ||||||||||||||||||||||||||||||||||||||||||
| 957 | } | ||||||||||||||||||||||||||||||||||||||||||
| 958 | |||||||||||||||||||||||||||||||||||||||||||
| 959 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 960 | } | ||||||||||||||||||||||||||||||||||||||||||
| 961 | |||||||||||||||||||||||||||||||||||||||||||
| 962 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 963 | |||||||||||||||||||||||||||||||||||||||||||
| 964 | =head1 VERSION | ||||||||||||||||||||||||||||||||||||||||||
| 965 | |||||||||||||||||||||||||||||||||||||||||||
| 966 | 1.240 | ||||||||||||||||||||||||||||||||||||||||||
| 967 | |||||||||||||||||||||||||||||||||||||||||||
| 968 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||
| 969 | |||||||||||||||||||||||||||||||||||||||||||
| 970 | Frank Seitz, L<http://fseitz.de/> | ||||||||||||||||||||||||||||||||||||||||||
| 971 | |||||||||||||||||||||||||||||||||||||||||||
| 972 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||||||||||||||||
| 973 | |||||||||||||||||||||||||||||||||||||||||||
| 974 | Copyright (C) 2026 Frank Seitz | ||||||||||||||||||||||||||||||||||||||||||
| 975 | |||||||||||||||||||||||||||||||||||||||||||
| 976 | =head1 LICENSE | ||||||||||||||||||||||||||||||||||||||||||
| 977 | |||||||||||||||||||||||||||||||||||||||||||
| 978 | This code is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||||||||||||
| 979 | it under the same terms as Perl itself. | ||||||||||||||||||||||||||||||||||||||||||
| 980 | |||||||||||||||||||||||||||||||||||||||||||
| 981 | =cut | ||||||||||||||||||||||||||||||||||||||||||
| 982 | |||||||||||||||||||||||||||||||||||||||||||
| 983 | # ----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||
| 984 | |||||||||||||||||||||||||||||||||||||||||||
| 985 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 986 | |||||||||||||||||||||||||||||||||||||||||||
| 987 | # eof | ||||||||||||||||||||||||||||||||||||||||||