fireartist has asked for the wisdom of the Perl Monks concerning the following question:

I've tried changing some code that used XS to use Inline::C instead.

When I run this code, it dies (with no error message, just a windows error dialog). If I try running it again, it seems to use the compiled code, but prints a symbol character, rather than the expected output.

I think I'm making an error with my perl API calls, but have no idea where I'm going wrong.

(I'm running perl 5.8.7, compiled with mingw/gcc 3.4.2) on winXP.

package InlineTest; use strict; use warnings; use Inline 'C' => <<CEND; SV* x (SV* hashref) { HV* self; SV* x; self = (HV*)SvRV(hashref); x = hv_fetch( self, "x", 1, 0 ); return x; } CEND sub new { my $self = shift; return bless {@_}, $self; } package main; use strict; use warnings; my $t = InlineTest->new( x => 'foo' ); print $t->x;