File Coverage

lib/ExtUtils/Typemaps/Default.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 1 1 100.0
total 20 20 100.0


line stmt bran cond sub pod time code
1             package ExtUtils::Typemaps::Default;
2              
3 1     1   1093 use strict;
  1         2  
  1         37  
4 1     1   6 use warnings;
  1         2  
  1         30  
5 1     1   5 use ExtUtils::Typemaps;
  1         2  
  1         194  
6              
7             our $VERSION = '1.05';
8              
9             our @ISA = qw(ExtUtils::Typemaps);
10              
11             require ExtUtils::Typemaps::ObjectMap;
12             require ExtUtils::Typemaps::Basic;
13             require ExtUtils::Typemaps::STL;
14              
15              
16             =head1 NAME
17              
18             ExtUtils::Typemaps::Default - A set of useful typemaps
19              
20             =head1 SYNOPSIS
21              
22             use ExtUtils::Typemaps::Default;
23             # First, read my own type maps:
24             my $private_map = ExtUtils::Typemaps->new(file => 'my.map');
25            
26             # Then, get the default set and merge it into my maps
27             my $map = ExtUtils::Typemaps::Default->new;
28             $private_map->merge(typemap => $map);
29            
30             # Now, write the combined map to an output file
31             $private_map->write(file => 'typemap');
32              
33             =head1 DESCRIPTION
34              
35             C is an C
36             subclass that provides a set of default mappings (in addition to what
37             perl itself provides). These default mappings are currently defined
38             as the combination of the mappings provided by the
39             following typemap classes which are provided in this distribution:
40              
41             L, L,
42             L
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 1     1 1 21395 my $class = shift;
56              
57 1         13 my $self = $class->SUPER::new(@_);
58 1         36 $self->merge(typemap => ExtUtils::Typemaps::Basic->new);
59 1         4614 $self->merge(typemap => ExtUtils::Typemaps::ObjectMap->new);
60 1         696 $self->merge(typemap => ExtUtils::Typemaps::STL->new);
61              
62 1         5517 return $self;
63             }
64              
65             1;
66              
67             __END__