| 1 | package Text::Diff3::Range3; | ||
| 2 | 6 | ▶ | use 5.006; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 6 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 6 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 6 | ▶ | use base qw(Text::Diff3::Base); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 6 | ▶ | use version; our $VERSION = '0.08'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | ## no critic (NamingConventions::Capitalization) | ||
| 10 | |||
| 11 | 6 | __PACKAGE__->mk_attr_accessor(qw(type lo0 hi0 lo1 hi1 lo2 hi2)); | |
| 12 | |||
| 13 | 37 | ▶ | sub as_array { |
|
Subroutine
as_array: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | 37 | my($self) = @_; | |
| 15 | 37 | return @{$self}{qw(type lo0 hi0 lo1 hi1 lo2 hi2)}; | |
| 16 | } | ||
| 17 | |||
| 18 | 0 | ▶ | sub as_string { |
|
Subroutine
as_string: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 19 | 0 | my($self) = @_; | |
| 20 | return sprintf '%s %d,%d %d,%d %d,%d', | ||
| 21 | 0 | @{$self}{qw(type lo0 hi0 lo1 hi1 lo2 hi2)}; | |
| 22 | } | ||
| 23 | |||
| 24 | 0 | ▶ | sub set_type_diff0 { return shift->set_type('0') } |
|
Subroutine
set_type_diff0: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 25 | 0 | ▶ | sub set_type_diff1 { return shift->set_type('1') } |
|
Subroutine
set_type_diff1: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 26 | 0 | ▶ | sub set_type_diff2 { return shift->set_type('2') } |
|
Subroutine
set_type_diff2: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 27 | 0 | ▶ | sub set_type_diffA { return shift->set_type('A') } |
|
Subroutine
set_type_diffA: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 28 | 0 | ▶ | sub range0 { return ($_[0]->lo0 .. $_[0]->hi0) } |
|
Subroutine
range0: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 29 | 0 | ▶ | sub range1 { return ($_[0]->lo1 .. $_[0]->hi1) } |
|
Subroutine
range1: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 30 | 0 | ▶ | sub range2 { return ($_[0]->lo2 .. $_[0]->hi2) } |
|
Subroutine
range2: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 31 | |||
| 32 | 0 | ▶ | sub set_type { |
|
Subroutine
set_type: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 33 | 0 | my($self, $x) = @_; | |
| 34 | 0 | $self->{type} = $x; | |
| 35 | 0 | return $self; | |
| 36 | } | ||
| 37 | |||
| 38 | 58 | ▶ | sub initialize { |
|
Subroutine
initialize: called CC=1 SCAR=0.0
Pod
documented
| |||
| 39 | 58 | my($self, @arg) = @_; | |
| 40 | 58 | $self->SUPER::initialize(@arg); | |
| 41 | 58 | @{$self}{qw(type lo0 hi0 lo1 hi1 lo2 hi2)} = @arg[1 .. 7]; | |
| 42 | 58 | return $self; | |
| 43 | } | ||
| 44 | |||
| 45 | 6 | 1; | |
| 46 | |||
| 47 | __END__ | ||