> I am trying to debug the Zeta perl module which fails when calling a c sub
> by the name of Zeta::_present
> the call to the Zeta:_present is as follows:
> eval{
> ($status, $reason, $howmany, @records) = Zeta::_present ($unique,
> $resultset, $items, $start, $esn, $recstx, $Zeta::TIMEOUT);};
>
> if($@){
> return 0;
> }
>
> the call to Zeta::_present does not return at all.
Mmmh, never heard of Zeta before (and it's not on CPAN). Googleing showed
up a couple of dead links.
However, the above code *should* work. If Zeta::_present really calls
Perl_croak() (did you check using a debugger?), it should return and
immediately leave the eval scope. If the call doesn't return at all, where
does it hang (again, a debugger might help to find that out)?
What happens without the eval { } block?
BTW, which version of perl are you using (Output of perl -V)?
> In addition:
> where can I find the actuall code of the c subs that are used by the perl
> module?
>From http://lists.w3.org/Archives/Public/www-zig/2000Jun/0021.html :
The biggest problem with the ZETA Perl Module is the inclusion
of system-dependent libraries that are still copyrighted by
Finsiel S.p.A.
They are currently available in binary format only and are
included within the module.
I never obtained the permissions to release the source
code under GPL and I stopped to ask :-(
So I guess you won't find the code at all...
-- Marcus
> Dana
>
> -----Original Message-----
> From: Marcus Holland-Moritz [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 22, 2003 5:26 PM
> To: Dana Sharvit - M
> Cc: [EMAIL PROTECTED]
> Subject: Re: catching Perl_croak
>
>
> Hi Dana,
>
> > I have a perl program that is call a c sub , the c subs issus a
> Perl_croak.
> > How can I catch that in the perl program, I tried with eval but it does
> not
> > work.
>
> You can definitely catch a call to Perl_croak() with eval.
>
> What exactly do you mean by "it does not work"?
> What happens? What do you think should happen?
> Can we see your code and what you expect it to do?
>
> -- Marcus
>