1 package ExtUtils::Typemaps::InputMap;
10 ExtUtils::Typemaps::InputMap - Entry in the INPUT section of a typemap
14 use ExtUtils::Typemaps;
16 my $input = $typemap->get_input_map('T_NV');
17 my $code = $input->code();
22 Refer to L<ExtUtils::Typemaps> for details.
30 Requires C<xstype> and C<code> parameters.
36 my $class = ref($prot)||$prot;
40 if (not defined $args{xstype} or not defined $args{code}) {
41 croak("Need xstype and code parameters");
46 (ref($prot) ? {%$prot} : {})
50 $self->{xstype} = $args{xstype} if defined $args{xstype};
51 $self->{code} = $args{code} if defined $args{code};
52 $self->{code} =~ s/^(?=\S)/\t/mg;
59 Returns or sets the INPUT mapping code for this entry.
64 $_[0]->{code} = $_[1] if @_ > 1;
70 Returns the name of the XS type of the INPUT map.
75 return $_[0]->{xstype};
84 Steffen Mueller C<<smueller@cpan.org>>
86 =head1 COPYRIGHT & LICENSE
88 Copyright 2009-2011 Steffen Mueller
90 This program is free software; you can redistribute it and/or
91 modify it under the same terms as Perl itself.