« /usr/local/lib/perl5/5.44.0/x86_64-linux/Encode/Encoding.pm
↑ Summary
lib/Skilletor/Source/Local.pm »
| 1 | package # hide from PAUSE | ||||||||||
| 2 | Class::XSAccessor::Heavy; | ||||||||||
| 3 | |||||||||||
| 4 | 7 | ▶ | use 5.008; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 7 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 7 | ▶ | use Carp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 7 | our $VERSION = '1.19'; | |||||||||
| 10 | 7 | our @CARP_NOT = qw( | |||||||||
| 11 | Class::XSAccessor | ||||||||||
| 12 | Class::XSAccessor::Array | ||||||||||
| 13 | ); | ||||||||||
| 14 | |||||||||||
| 15 | # TODO Move more duplicated code from XSA and XSA::Array here | ||||||||||
| 16 | |||||||||||
| 17 | |||||||||||
| 18 | 0 | ▶ | sub check_sub_existence { | ||||||||
|
Subroutine
check_sub_existence: not called CC=3 SCAR=18.9
Pod
undocumented
| |||||||||||
| 19 | 0 | my $subname = shift; | |||||||||
| 20 | |||||||||||
| 21 | 0 | my $sub_package = $subname; | |||||||||
| 22 | 0 | ▶ | $sub_package =~ s/([^:]+)$// or die; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | 0 | my $bare_subname = $1; | |||||||||
| 24 | |||||||||||
| 25 | 0 | my $sym; | |||||||||
| 26 | { | ||||||||||
| 27 | 0 | ▶ | no strict 'refs'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.2
| |||||||||||
| 28 | 0 | $sym = \%{"$sub_package"}; | |||||||||
| 29 | } | ||||||||||
| 30 | 7 | ▶ | no warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 31 | 0 | local *s = $sym->{$bare_subname}; | |||||||||
| 32 | 0 | my $coderef = *s{CODE}; | |||||||||
| 33 | 0 | ▶ | if ($coderef) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 0 | $sub_package =~ s/::$//; | |||||||||
| 35 | 0 | Carp::croak("Cannot replace existing subroutine '$bare_subname' in package '$sub_package' with an XS implementation. If you wish to force a replacement, add the 'replace => 1' parameter to the arguments of 'use ".(caller())[0]."'."); | |||||||||
| 36 | } | ||||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 7 | 1; | |||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||