| 1 | package Text::Orientation::StringOperation; | ||||||||||
| 2 | 1 | ▶ | use String::Multibyte; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 14 | ▶ | sub new{ | ||||||||
|
Subroutine
new: called CC=2 SCAR=9.2
Pod
undocumented
| |||||||||||
| 5 | 14 | ▶ | return bless { MB => String::Multibyte->new($_[1]) }, $_[0] if $_[1]; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 6 | 0 | bless {},$_[0]; | |||||||||
| 7 | } | ||||||||||
| 8 | |||||||||||
| 9 | 85 | ▶ | sub length { $_[0]->{MB} ? $_[0]->{MB}->length($_[1]) : length $_[1] } | ||||||||
|
Subroutine
length: called CC=2 SCAR=7.6
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 10 | 8 | ▶ | sub reverse { $_[0]->{MB} ? $_[0]->{MB}->strrev($_[1]) : reverse $_[1] } | ||||||||
|
Subroutine
reverse: called CC=2 SCAR=7.6
Pod
undocumented
Branch: 1 branch
| |||||||||||
| 11 | 80 | ▶ | sub substr { | ||||||||
|
Subroutine
substr: called CC=2 SCAR=7.2
Pod
undocumented
| |||||||||||
| 12 | 80 | my $pkg = shift; | |||||||||
| 13 | 80 | ▶ | $pkg->{MB} ? $pkg->{MB}->substr(@_) : | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | substr(shift, shift, shift); | ||||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | 1 | 1; | |||||||||