| 1 | package File::Rename::Unicode; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use 5.012; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 2 | ▶ | use Encode qw(encode decode); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 2 | our $VERSION = '1.30'; | |||||||||
| 11 | |||||||||||
| 12 | sub code { | ||||||||||
| 13 | 2 | ▶ | my $code = shift; | ||||||||
|
Subroutine
code: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 14 | 2 | my $encoding = shift; | |||||||||
| 15 | return | ||||||||||
| 16 | sub { | ||||||||||
| 17 | 2 | ▶ | use feature 'unicode_strings'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 2 | ▶ | if ( $encoding ) { | ||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
Branch: 1 branch
| |||||||||||
| 19 | 1 | $_ = decode($encoding, $_); | |||||||||
| 20 | } | ||||||||||
| 21 | else { | ||||||||||
| 22 | 1 | utf8::upgrade $_; | |||||||||
| 23 | } | ||||||||||
| 24 | 2 | $code->(); | |||||||||
| 25 | 2 | ▶ | if ( $encoding ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 1 | $_ = encode($encoding, $_); | |||||||||
| 27 | } | ||||||||||
| 28 | 2 | }; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 2 | 1; | |||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||