script/epfl-sciper-list.pl untested

filter: Statementstmt 0.0% 0 / 25 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod n/a totaltotal 0.0% 0 / 37 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/env perl
2  
3 use strict;
4 use warnings;
5  
6 use Getopt::Long;
7 use Pod::Usage;
8  
9 use EPFL::Sciper::List qw/retrieveSciper toJson toTsv/;
10  
11 =head1 NAME
12  
13 epfl-sciper-list.pl
14  
15 =head1 DESCRIPTION
16  
17 Get a list of all public active sciper from EPFL
18  
19 =head1 VERSION
20  
21 Version 0.02
22  
23 =head1 USAGE
24  
25 epfl-sciper-list.pl --help
26  
27 epfl-sciper-list.pl --output=json > sciper.json
28  
29 epfl-sciper-list.pl --output=tsv > sciper.tsv
30  
31 =head1 OPTIONS
32  
33 =over 2
34  
35 =item --output=tsv|json
36  
37 Output format in TSV or Json.
38  
39 =back
40  
41 =cut
42  
43 our $VERSION = '0.02';
44  
45 my ( $help, $output );
46  
47 GetOptions(
48 'output=s' => \$output,
49 'help' => \$help,
50 ) || pod2usage(2);
51  
52 if ($help) {
53 pod2usage(1);
54 exit 0;
55 }
56  
57 my @listPersons = retrieveSciper();
58  
59 if ( $output eq 'json' ) {
60 print toJson(@listPersons);
61 }
62 else {
63 print toTsv(@listPersons);
64 }
65  
66 =head1 AUTHOR
67  
68 William Belle, C<< <william.belle at gmail.com> >>
69  
70 =head1 BUGS AND LIMITATIONS
71  
72 Please report any bugs or feature requests here L<https://github.com/epfl-devrun/epfl-sciper-list/issues>.
73 I will be notified, and then you'll automatically be notified of progress on
74 your bug as I make changes.
75  
76 =head1 SUPPORT
77  
78 You can find documentation for this module with the perldoc command.
79  
80 perldoc epfl-sciper-list.pl
81  
82 You can also look for information at:
83  
84 =over 4
85  
86 =item * AnnoCPAN: Annotated CPAN documentation
87  
88 L<http://annocpan.org/dist/EPFL-Sciper-List>
89  
90 =item * CPAN Ratings
91  
92 L<http://cpanratings.perl.org/d/EPFL-Sciper-List>
93  
94 =item * Search CPAN
95  
96 L<http://search.cpan.org/dist/EPFL-Sciper-List/>
97  
98 =back
99  
100 =head1 LICENSE AND COPYRIGHT
101  
102 Copyright ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017.
103  
104 Licensed under the Apache License, Version 2.0 (the "License");
105 you may not use this file except in compliance with the License.
106 You may obtain a copy of the License at
107  
108 L<http://www.apache.org/licenses/LICENSE-2.0>
109  
110 Unless required by applicable law or agreed to in writing, software
111 distributed under the License is distributed on an "AS IS" BASIS,
112 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
113 See the License for the specific language governing permissions and
114 limitations under the License.
115  
116 =cut
117  
118 1;