snartemo.pl untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl
2 use warnings;
3 use strict;
4 use Weaving::Tablet::Tk;
5  
6 use Getopt::Euclid;
7  
8 my $pattern;
9 my %args;
10 $args{is_twill} = exists $ARGV{-t};
11  
12 if (exists $ARGV{-i})
13 {
14 $pattern = Weaving::Tablet::Tk->new_pattern(file => $ARGV{-i}, %args);
15 }
16 else
17 {
18 $pattern = Weaving::Tablet::Tk->new_pattern(cards => $ARGV{-c}, rows => $ARGV{-r}, %args);
19 }
20 Tk::MainLoop();
21  
22 __END__
23  
24 =head1 OPTIONS
25  
26 =over 4
27  
28 =item -i <file>
29  
30 =for Euclid:
31 file.type: readable
32  
33 The input pattern file to work with.
34  
35 =item -c[ards] <number>
36  
37 =for Euclid:
38 number.type: integer
39 number.default: 20
40  
41 The number of cards to generate if an input file is not given. Defaults to 20.
42  
43 =item -r[ows] <number>
44  
45 =for Euclid:
46 number.type: integer
47 number.default: 10
48  
49 The number of turns to generate if an input file is not given. Defaults to 10.
50  
51 =item -t[will]
52  
53 Create or interpret the pattern as a 3/1 twill/repp pattern.
54  
55 =back
56