Typemaps/STL.pm

filter: Statementstmt 100% 27 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 1 / 1 totaltotal 100% 35 / 35 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Typemaps/ObjectMap.pm ↑ Summary Typemaps/STL/String.pm »
1 package ExtUtils::Typemaps::STL;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use ExtUtils::Typemaps;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use ExtUtils::Typemaps::STL::Vector;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use ExtUtils::Typemaps::STL::String;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use ExtUtils::Typemaps::STL::List;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 our $VERSION = '1.07';
11  
12 2 our @ISA = qw(ExtUtils::Typemaps);
13  
14 =head1 NAME
15  
16 ExtUtils::Typemaps::STL - A set of useful typemaps for STL
17  
18 =head1 SYNOPSIS
19  
20 use ExtUtils::Typemaps::STL;
21 # First, read my own type maps:
22 my $private_map = ExtUtils::Typemaps->new(file => 'my.map');
23
24 # Then, get the STL set and merge it into my maps
25 my $map = ExtUtils::Typemaps::STL->new;
26 $private_map->merge(typemap => $map);
27
28 # Now, write the combined map to an output file
29 $private_map->write(file => 'typemap');
30  
31 =head1 DESCRIPTION
32  
33 C<ExtUtils::Typemaps::STL> is an C<ExtUtils::Typemaps>
34 subclass that provides a few of default mappings for Standard Template Library
35 types. These default mappings are currently defined
36 as the combination of the mappings provided by the
37 following typemap classes which are provided in this distribution:
38  
39 L<ExtUtils::Typemaps::STL::Vector>, L<ExtUtils::Typemaps::STL::String>,
40 L<ExtUtils::Typemaps::STL::List>
41  
42 More are to come, patches are welcome.
43  
44 =head1 METHODS
45  
46 These are the overridden methods:
47  
48 =head2 new
49  
50 Creates a new C<ExtUtils::Typemaps::STL> object.
51  
52 =cut
53  
54 4 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
55 4 my $class = shift;
56  
57 4 my $self = $class->SUPER::new(@_);
58 4 $self->merge(typemap => ExtUtils::Typemaps::STL::String->new);
59 4 $self->merge(typemap => ExtUtils::Typemaps::STL::Vector->new);
60 4 $self->merge(typemap => ExtUtils::Typemaps::STL::List->new);
61  
62 4 return $self;
63 }
64  
65 2 1;
66  
67 __END__
« Typemaps/ObjectMap.pm ↑ Summary Typemaps/STL/String.pm »