| 1 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 6 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 6 | ▶ | use File::Rename; # REQUIRE_ORDER | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | use Pod::Usage; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 6 | ▶ | main() unless caller; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 7 | |||||||||||
| 8 | sub main { | ||||||||||
| 9 | 10 | ▶ | my $options = File::Rename::Options::GetOptions() | ||||||||
|
Subroutine
main: called CC=7 SCAR=21.2
Branch: 1 branch
| |||||||||||
| 10 | or pod2usage; | ||||||||||
| 11 | |||||||||||
| 12 | 10 | ▶ | pod2usage( -verbose => 0, | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | -exitval => 'NOEXIT', | ||||||||||
| 14 | -message => <<'MESSAGE', | ||||||||||
| 15 | -u|--unicode argument does not look like an encoding: | ||||||||||
| 16 | either give an encoding or put -e as next option | ||||||||||
| 17 | MESSAGE | ||||||||||
| 18 | ) if File::Rename::Options::bad_encoding($options); | ||||||||||
| 19 | |||||||||||
| 20 | 10 | ▶ | mod_version() if $options->{show_version}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 9 | ▶ | pod2usage( -verbose => 2 ) if $options->{show_manual}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 9 | ▶ | pod2usage( -exitval => 1 ) if $options->{show_help}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | |||||||||||
| 24 | 9 | ▶ | @ARGV = map {glob} @ARGV if $^O =~ m{Win}msx; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | |||||||||||
| 26 | 9 | File::Rename::rename(\@ARGV, $options); | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | sub mod_version { | ||||||||||
| 30 | 1 | ▶ | print __FILE__; | ||||||||
|
Subroutine
mod_version: called CC=2 SCAR=7.0
| |||||||||||
| 31 | 1 | print ' using File::Rename version '. $File::Rename::VERSION; | |||||||||
| 32 | 1 | ▶ | print ', File::Rename::Options version '. $File::Rename::Options::VERSION | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | if (eval $File::Rename::Options::VERSION) < (eval $File::Rename::VERSION); | ||||||||||
| 34 | # ignore $File::Rename::Unicode::VERSION | ||||||||||
| 35 | 1 | print "\n\n"; | |||||||||
| 36 | 1 | exit 0 | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 6 | 1; | |||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||