script/orepan2-merge-index

filter: Statementstmt 100% 23 / 23 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 93.5% 29 / 31 CC 1 SCAR 0.0
CC
1
Cov
93%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/OrePAN2/Logger.pm ↑ Summary script/orepan2-gc »
1 #!perl
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use OrePAN2::Index;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Getopt::Long;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 my $version;
8 1 my $p = Getopt::Long::Parser->new(
9 config => [qw(posix_default no_ignore_case auto_help)]
10 );
11 1 $p->getoptions(
12 'o=s' => \my $outfilename,
13 'simple!' => \my $simple,
14 );
15  
16 1 my $outfh = *STDOUT;
17 1 ▶if (defined $outfilename) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $outfilename) 1 0 1
18 1 ▶ open $outfh, '>', $outfilename
Branch: 1 branch
BranchTrueFalseTotal
open $outfh, ">", $outfilename or die "Cannot open $outfilename for writing: $!" 0 1 1
19 or die "Cannot open $outfilename for writing: $!";
20 }
21  
22 1 my $index = OrePAN2::Index->new();
23 1 for my $filename (@ARGV) {
24 2 $index->load($filename, {replace => 1});
25 }
26 1 print {$outfh} $index->as_string({simple => $simple});
27  
28 __END__
29  
30 =head1 SYNOPSIS
31  
32 % orepan2-merge-index -o merged.txt foo/02packages.details.txt bar/02packages.details.txt.gz
33  
34 =head1 DESCRIPTION
35  
36 Combines 2 or more 02packages.details.txt.gz files.
37  
38 =head1 DEVELOPMENT STATUS
39  
40 B<Unstable>
41  
42 =head1 OPTIONS
43  
44 =head2 o
45  
46 % orepan2-merge-index -o merged.txt foo/02packages.details.txt bar/02packages.details.txt.gz
47  
48 Name of output file
49  
50 =head2 simple
51  
52 Use a simple format for 02packages metadata. This helps avoid merge conflicts.
53  
54 > orepan2-merge-index --simple -o merged.txt foo/02packages.details.txt bar/02packages.details.txt.gz
55  
56 =cut
« blib/lib/OrePAN2/Logger.pm ↑ Summary script/orepan2-gc »