| 1 | #!/usr/bin/perl | ||||||||||
| 2 | package SQL::QueryBuilder::Pretty::Database::ANSI::Space; | ||||||||||
| 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 match { | ||||||||
|
Subroutine
match: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 14 | 0 | return qr/ | |||||||||
| 15 | (?:\r?\n|[\t\s])+ | ||||||||||
| 16 | /x; | ||||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub action { | ||||||||
|
Subroutine
action: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 20 | 0 | my $self = shift; | |||||||||
| 21 | 0 | my $print = shift; | |||||||||
| 22 | 0 | my $token = shift; | |||||||||
| 23 | |||||||||||
| 24 | # Ignore new lines and convert tabs to 1 space | ||||||||||
| 25 | 0 | ▶ | if ( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | $token =~ /^[\t\s]+$/ | ||||||||||
| 27 | ) { | ||||||||||
| 28 | 0 | ▶ | $print->var(' ') unless $print->skip_next_space; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | $print->skip_next_space(0); | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | 0 | return 1; | |||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 1 | 1; | |||||||||
| 36 | __END__ | ||||||||||