blib/lib/ExtUtils/Typemaps/Excommunicated.pm

filter: Statementstmt 100% 16 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 21 / 21 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
↑ Summary
1 package ExtUtils::Typemaps::Excommunicated;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use ExtUtils::Typemaps;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 our $VERSION = '0.01';
8 1 our @ISA = qw(ExtUtils::Typemaps);
9  
10 =head1 NAME
11  
12 ExtUtils::Typemaps::Excommunicated - Typemaps that have been removed from the core
13  
14 =head1 SYNOPSIS
15  
16 To use one or more of the typemaps from this module in a CPAN
17 distribution, add a built-time dependency on this module, and
18 include the following line in your XS code:
19  
20 INCLUDE_COMMAND: $^X -MExtUtils::Typemaps::Cmd \
21 -e "print embeddable_typemap(q{Excommunicated})"
22  
23 =head1 DESCRIPTION
24  
25 C<ExtUtils::Typemaps::Excommunicated> is an C<ExtUtils::Typemaps>
26 subclass that provides typemaps that have been booted from the perl
27 core. They might have been removed from the core for various reasons,
28 but we're really honest, it's really because their addition points back
29 at perl 5.0 and nobody knows what the hell they were intended for.
30  
31 Right now, this means the following typemaps:
32  
33 T_DATAUNIT (OUTPUT only)
34
35 T_CALLBACK
36  
37 =cut
38  
39 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
40 1 my $class = shift;
41  
42 1 my $self = $class->SUPER::new(@_);
43 1 $self->add_string(string => <<'END_OF_TYPEMAP');
44 INPUT
45 T_CALLBACK
46 $var = make_perl_cb_$type($arg)
47  
48 OUTPUT
49  
50 T_DATAUNIT
51 sv_setpvn($arg, $var.chp(), $var.size());
52  
53 T_CALLBACK
54 sv_setpvn($arg, $var.context.value().chp(),
55 $var.context.value().size());
56 END_OF_TYPEMAP
57  
58 1 return $self;
59 }
60  
61 1 1;
62  
63 __END__
↑ Summary