Currently if you use an unknown type with xs_generate you get:
writing...WrapXS/typemap
Odd number of elements in hash assignment at lib/ModPerl/TypeMap.pm line
151.
which is not very helpful and just shows that the code is flowed.
Here is a patch that avoids this error and hints the culprit:
Index: lib/ModPerl/TypeMap.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/lib/ModPerl/TypeMap.pm,v
retrieving revision 1.13
diff -u -r1.13 TypeMap.pm
--- lib/ModPerl/TypeMap.pm 21 Feb 2002 01:40:03 -0000 1.13
+++ lib/ModPerl/TypeMap.pm 5 Mar 2002 06:36:00 -0000
@@ -143,10 +143,14 @@
sub map_arg {
my($self, $arg) = @_;
+
+ my $map_type = $self->map_type($arg->{type});
+ die "unknown typemap: '$arg->{type}'" unless defined $map_type;
+
return {
name => $arg->{name},
default => $arg->{default},
- type => $self->map_type($arg->{type}),
+ type => $map_type,
rtype => $arg->{type},
}
}
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]