| 1 | 2 | ▶ | use 5.008003; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | package no::warnings; | ||||||||||
| 6 | |||||||||||
| 7 | 2 | our $AUTHORITY = 'cpan:TOBYINK'; | |||||||||
| 8 | 2 | our $VERSION = '0.001000'; | |||||||||
| 9 | |||||||||||
| 10 | 6 | ▶ | sub no::warnings { | ||||||||
|
Subroutine
warnings: called CC=2 SCAR=8.5
| |||||||||||
| 11 | 6 | my $code = pop; | |||||||||
| 12 | 6 | my $next = $SIG{__WARN__}; | |||||||||
| 13 | 6 | ▶ | my $handler = sub {}; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 6 | ▶ | if ( @_ ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 2 | my @ignore = @_; | |||||||||
| 17 | 2 | require match::simple; | |||||||||
| 18 | 0 | ▶ | $handler = sub { | ||||||||
|
Subroutine
__ANON__: not called CC=3 SCAR=24.8
| |||||||||||
| 19 | 0 | my $warning = shift; | |||||||||
| 20 | 0 | ▶ | return if match::simple::match( $warning, \@ignore ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | ▶ | $next ? $next->( $warning ) : warn( $warning ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 22 | 0 | }; | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 4 | local $SIG{__WARN__} = $handler; | |||||||||
| 26 | 4 | return $code->(); | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 2 | 1; | |||||||||
| 30 | |||||||||||
| 31 | __END__ | ||||||||||