Thanks everyone. I have constants working (h2xs put the
C-code at the top of the .xs file, but I needed to add the
XSUB code after the "MODULE... PACKAGE..." line) and I've
debugged my other problem. The people on this list are
very helpful. Thanks!
Two answers I received and noticed were not sent to the list
are the following. I've tried the first - it worked well
for me. The 2nd looks equally interesting:
1) if you're familiar with gdb, you can do this (first put some tests in
test.pl):
cd /my/perlmodule/dir
gdb /path/to/perl
set args -I. -I./blib/lib -I./blib/arch -d test.pl
run
(at this point, you'll have a perl debugger prompt and can step through
lines of code or what not).
<ctrl-c>
sharedlibrary (to load shared libs)
(now you can set breakpoints and 'continue' in the perl debugger)
2) If you want a breakpoint in the xs file,
(I put a breakpoint in the Foo::constant function)
make perl
gdb ./perl
b XS_Foo_constant
r -Iblib/arch -Iblib/lib -MFoo -wle 'print MAXNAME'
- Janice