blib/script/bingo_print.pl untested

filter: Statementstmt 0.0% 0 / 30 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 42 CC 1 SCAR 6.9
CC
1
Cov
0%
usage
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/local/bin/perl -w
2  
3 # $Id: bingo_print.pl 1835 2007-03-17 17:36:20Z jonasbn $
4  
5 use strict;
6 use PDFLib;
7 use Getopt::Long;
8 use Data::Dumper;
9 use Games::Bingo::Print;
10  
11 my ($cards, $help, $heading, $text, $filename, $papersize);
12  
13 GetOptions (
14 'help' => \$help,
15 'heading=s' => \$heading,
16 'text=s' => \$text,
17 'filename=s' => \$filename,
18 'cards=i' => \$cards,
19 'papersize=s' => \$papersize,
20 );
21  
22 my $pages = shift @ARGV || usage();
23  
24 my $bp = Games::Bingo::Print->new(
25 'heading' => $heading,
26 'text' => $text,
27 'filename' => $filename,
28 'papersize' => $papersize,
29 );
30  
31 $bp->print_pages($pages, $cards);
32  
33 exit(0);
34  
35 sub usage {
36 print "Usage: bingo_print.pl [options] <number of pages>\n\n";
37 print "Options:\n";
38 print "\t--help\t(this message)\n";
39 print "\t--heading\ta string which will be inserted as a header\n";
40 print "\t--text\ta string to be inserted underneath the header\n";
41 print "\t--filename\ta filename for the PDF target file\n";
42 print "\t--cards\tthe number of cards per page (1-3, 3 is default)\n";
43 print "\t--papersize\tthe format of the paper, A4 is default)\n";
44
45 exit(0);
46 }
47  
48 __END__