In Safe, load Carp::Heavy only if it exists (to remain
Rafael Garcia-Suarez [Mon, 28 Jan 2008 15:28:02 +0000 (15:28 +0000)]
compatible with older perls)

p4raw-id: //depot/perl@33093

ext/Opcode/Safe.pm

index 68c60a6..5ec376b 100644 (file)
@@ -26,7 +26,9 @@ sub lexless_anon_sub {
 }
 
 use Carp;
-use Carp::Heavy;
+BEGIN { eval q{
+    use Carp::Heavy;
+} }
 
 use Opcode 1.01, qw(
     opset opset_to_ops opmask_add