NAME

ExtUtils::ExCxx - Switch to ANSI C++ exceptions

SYNOPSIS

use ExtUtils::ExCxx;

DESCRIPTION

Switch perl's default TRYBLOCK method to a C++ try/throw style method at run-time. This should be completely transparent (except to extensions that covertly invoke such low-level exception handling routines :-).

IS C++ FASTER?

Yes, for some definition of 'faster':

$ perl -Mblib ./bench.pl

[ setjmp ] 20 secs (18.79 usr  2.02 sys = 20.81 cpu)
[ cxx    ] 17 secs (17.14 usr  0.00 sys = 17.14 cpu)

PATCHES

At the moment, this extension requires patches to the perl source code. Hopefully, these changes will make it into the next developer release. Either apply stage0[1-3] or the whole.patch to 5.004_56.

'make test' should be 100%!

(FYI: You don't need to built this extension to test the patch.)

ALSO

call_list should probably be optimized to call TRYBLOCK only once instead of doing it for each BEGIN or END block. However, the control flow is messy enough that I didn't attempt it.

dJMPENV is setjmp-centric. This might be construed as a bug.

FUNCTIONS AFFECTED

  • JMPENV_PUSH

    perl_call_sv
    perl_eval_sv
    docatch
    perl_parse
    perl_run
    call_list
  • JMPENV_JUMP

    die
    croak
    docatch
    pp_goto
    calllist
    my_exit_jump

BUGS

sigsetjmp saves more state than a C++ try block. sigprocmask & priocntl stuff should be addressed.

AUTHOR

Copyright © 1997-1998 Joshua Nathaniel Pritikin. All rights reserved.

This package is free software and is provided "as is" without express or implied warranty. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html)

The author hereby releases the included patches to the perl source code to the public domain. Thanks a ton! pritikin@mindspring.com

1 POD Error

The following errors were encountered while parsing the POD:

Around line 74:

Non-ASCII character seen before =encoding in '©'. Assuming CP1252