| 1 | package Syntax::Keyword::Assert 0.20; | ||||||||||
| 2 | |||||||||||
| 3 | 11 | ▶ | use v5.14; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 11 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 11 | ▶ | use Carp (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 11 | require XSLoader; | |||||||||
| 9 | 11 | XSLoader::load( __PACKAGE__, our $VERSION ); | |||||||||
| 10 | |||||||||||
| 11 | 10 | ▶ | sub import { | ||||||||
|
Subroutine
import: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 10 | my $pkg = shift; | |||||||||
| 13 | 10 | my $caller = caller; | |||||||||
| 14 | |||||||||||
| 15 | 10 | $pkg->import_into( $caller, @_ ); | |||||||||
| 16 | } | ||||||||||
| 17 | |||||||||||
| 18 | 1 | ▶ | sub unimport { | ||||||||
|
Subroutine
unimport: called CC=1 SCAR=0.0
| |||||||||||
| 19 | 1 | my $pkg = shift; | |||||||||
| 20 | 1 | my $caller = caller; | |||||||||
| 21 | |||||||||||
| 22 | 1 | $pkg->unimport_into( $caller, @_ ); | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 10 | ▶ | sub import_into { shift->apply( sub { $^H{ $_[0] }++ }, @_ ) } | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
import_into: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 26 | 1 | ▶ | sub unimport_into { shift->apply( sub { delete $^H{ $_[0] } }, @_ ) } | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
Subroutine
unimport_into: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 27 | |||||||||||
| 28 | 11 | ▶ | sub apply { | ||||||||
|
Subroutine
apply: called CC=4 SCAR=14.8
Pod
undocumented
| |||||||||||
| 29 | 11 | my $pkg = shift; | |||||||||
| 30 | 11 | my ( $cb, $caller, @syms ) = @_; | |||||||||
| 31 | |||||||||||
| 32 | 11 | ▶ | @syms or @syms = qw( assert ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 33 | |||||||||||
| 34 | 11 | my %syms = map { $_ => 1 } @syms; | |||||||||
| 35 | 11 | ▶ | $cb->( "Syntax::Keyword::Assert/assert" ) if delete $syms{assert}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | |||||||||||
| 37 | 0 | ▶ | Carp::croak "Unrecognised import symbols @{[ keys %syms ]}" if keys %syms; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | 11 | 1; | |||||||||
| 41 | __END__ | ||||||||||