File Coverage

lib/ExtUtils/Typemaps/STL.pm
Criterion Covered Total %
statement 24 24 100.0
branch n/a
condition n/a
subroutine 7 7 100.0
pod 1 1 100.0
total 32 32 100.0


line stmt bran cond sub pod time code
1             package ExtUtils::Typemaps::STL;
2              
3 1     1   999 use strict;
  1         2  
  1         35  
4 1     1   5 use warnings;
  1         2  
  1         27  
5 1     1   6 use ExtUtils::Typemaps;
  1         2  
  1         21  
6 1     1   5 use ExtUtils::Typemaps::STL::Vector;
  1         21  
  1         22  
7 1     1   6 use ExtUtils::Typemaps::STL::String;
  1         1  
  1         22  
8 1     1   5 use ExtUtils::Typemaps::STL::List;
  1         2  
  1         161  
9              
10             our $VERSION = '1.05';
11              
12             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 is an C
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, L,
40             L
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 object.
51              
52             =cut
53              
54             sub new {
55 2     2 1 1226 my $class = shift;
56              
57 2         17 my $self = $class->SUPER::new(@_);
58 2         62 $self->merge(typemap => ExtUtils::Typemaps::STL::String->new);
59 2         781 $self->merge(typemap => ExtUtils::Typemaps::STL::Vector->new);
60 2         3721 $self->merge(typemap => ExtUtils::Typemaps::STL::List->new);
61              
62 2         6560 return $self;
63             }
64              
65             1;
66              
67             __END__