| 1 | 30 | ▶ | use Perlmazing qw(define not_empty); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 30 | ▶ | use Scalar::Util qw(looks_like_number); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 0 | ▶ | sub main ($) { | ||||||||
|
Subroutine
main: not called CC=5 SCAR=29.7
| |||||||||||
| 5 | 0 | my $i = shift; | |||||||||
| 6 | 30 | ▶ | no warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 0 | ▶ | return 0 unless not_empty($i); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 8 | 0 | ▶ | return 0 if $i =~ /[;:\s\n&=\$%\@\(\)\*]/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 9 | 0 | ▶ | return 0 if $i =~ /[^e][\+\-]/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 10 | 0 | ▶ | return 1 if $i =~ /^0x\d+$/i; # Not detected by Scalar::Util | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | 0 | $i =~ s/(\d)_(\d)/$1$2/g; # Also not accepted by Scalar::Util | |||||||||
| 12 | 0 | define looks_like_number $i;; | |||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||