Pretty/Database/ANSI/Punctuation.pm

filter: Statementstmt 44.7% 17 / 38 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 5 / 8 Podpod 100% 3 / 3 totaltotal 45.4% 25 / 55 CC 4 SCAR 20.9
CC
4
Cov
39%
action
20.0
order
2.0
match
2.0
CRAP 8.1
« Pretty.pm ↑ Summary Pretty/Database/ANSI/Space.pm »
1 #!/usr/bin/perl
2 package SQL::QueryBuilder::Pretty::Database::ANSI::Punctuation;
3 1 ▶use base qw(SQL::QueryBuilder::Pretty::Rule);
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 our $VERSION = '0.01';
9  
10 1 ▶use Carp qw(croak);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 0 ▶sub order { return 50 }
Subroutine order: not called CC=1 SCAR=6.9
Pod documented
14  
15 0 ▶sub match {
Subroutine match: not called CC=1 SCAR=6.9
Pod documented
16 0 return qr/
17 [\[\]\(\),;.]
18 /x;
19 }
20  
21 0 ▶sub action {
Subroutine action: not called CC=4 SCAR=30.0
Pod documented
22 0 my $self = shift;
23 0 my $print = shift;
24 0 my $token = shift;
25  
26 0 ▶ if ( $token =~ /^,$/ ) {
Branch: 3 branches
BranchTrueFalseTotal
if ($token =~ /^,$/) { } 0 0 0
elsif ($token =~ /^\($/) { } 0 0 0
elsif ($token =~ /^\)$/) { } 0 0 0
27 0 $print->var($token);
28 0 $print->new_line;
29 0 $print->var( $print->current_indent );
30  
31 0 $print->skip_next_space(1);
32 }
33 elsif ( $token =~ /^\($/ ) {
34 0 $print->var($token);
35 0 $print->new_line;
36 0 $print->indent;
37  
38 0 $print->indent_multiplier(1);
39 0 $print->skip_next_space(1);
40 }
41 elsif ( $token =~ /^\)$/ ) {
42 0 $print->new_line;
43 0 $print->unindent( $print->indent_multiplier );
44 0 $print->var($token);
45  
46 0 $print->indent_multiplier(1);
47 }
48 else {
49 0 $self->SUPER::action($print, $token, @_);
50 }
51  
52 0 return 1;
53 }
54  
55 1 1;
56 __END__
« Pretty.pm ↑ Summary Pretty/Database/ANSI/Space.pm »