On Thu, 16 Mar 2000, Sam Tregar wrote: > On Thu, 16 Mar 2000, Matt Sergeant wrote: > > > > Users of CGI::Carp don't call any > > > methods, they just do a 'use CGI::Carp qw(fatals_to_browser);'. How can > > > your method work via a 'use' statement? > > > > With a CORE::die overload. > > Sounds easy enough. What's stopping the anti-$SIG{__DIE__} crew from > putting together a patch? I think you'd have a much easier time > deprecating $SIG{__DIE__}'s "features" if you could get the mod_perl > people off your backs. Well it probably still breaks things, for one... But fair point - actions speak louder than words... (yes, I know the patch isn't perfect, but maybe it'll get things moving) *** Carp.pm.orig Sat Jan 23 23:44:44 1999 --- Carp.pm Thu Mar 16 16:47:25 2000 *************** *** 190,199 **** @ISA = qw(Exporter); @EXPORT = qw(confess croak carp); ! @EXPORT_OK = qw(carpout fatalsToBrowser wrap set_message cluck); $main::SIG{__WARN__}=\&CGI::Carp::warn; ! $main::SIG{__DIE__}=\&CGI::Carp::die; $CGI::Carp::VERSION = '1.13'; $CGI::Carp::CUSTOM_MSG = undef; --- 190,199 ---- @ISA = qw(Exporter); @EXPORT = qw(confess croak carp); ! @EXPORT_OK = qw(carpout fatalsToBrowser wrap set_message cluck die); $main::SIG{__WARN__}=\&CGI::Carp::warn; ! #$main::SIG{__DIE__}=\&CGI::Carp::die; $CGI::Carp::VERSION = '1.13'; $CGI::Carp::CUSTOM_MSG = undef; *************** *** 206,211 **** --- 206,214 ---- my($oldlevel) = $Exporter::ExportLevel; $Exporter::ExportLevel = 1; Exporter::import($pkg,keys %routines); + if ($routines{'fatalsToBrowser'}) { + $pkg->export('CORE::GLOBAL','die'); + } $Exporter::ExportLevel = $oldlevel; } -- <Matt/> Details: FastNet Software Ltd - XML, Perl, Databases. Tagline: High Performance Web Solutions Web Sites: http://come.to/fastnet http://sergeant.org Available for Consultancy, Contracts and Training.