+# Test the location of error messages.
+like(A::short(), qr/^Error at C/, "Short messages skip carped package");
+
+{
+ local @C::ISA = "D";
+ like(A::short(), qr/^Error at B/, "Short messages skip inheritance");
+}
+
+{
+ local @D::ISA = "C";
+ like(A::short(), qr/^Error at B/, "Short messages skip inheritance");
+}
+
+{
+ local @D::ISA = "B";
+ local @B::ISA = "C";
+ like(A::short(), qr/^Error at A/, "Inheritance is transitive");
+}
+
+{
+ local @B::ISA = "D";
+ local @C::ISA = "B";
+ like(A::short(), qr/^Error at A/, "Inheritance is transitive");
+}
+
+{
+ local @C::CARP_NOT = "D";
+ like(A::short(), qr/^Error at B/, "Short messages see \@CARP_NOT");
+}
+
+{
+ local @D::CARP_NOT = "C";
+ like(A::short(), qr/^Error at B/, "Short messages see \@CARP_NOT");
+}
+
+{
+ local @D::CARP_NOT = "B";
+ local @B::CARP_NOT = "C";
+ like(A::short(), qr/^Error at A/, "\@CARP_NOT is transitive");
+}
+
+{
+ local @B::CARP_NOT = "D";
+ local @C::CARP_NOT = "B";
+ like(A::short(), qr/^Error at A/, "\@CARP_NOT is transitive");
+}
+
+{
+ local @D::ISA = "C";
+ local @D::CARP_NOT = "B";
+ like(A::short(), qr/^Error at C/, "\@CARP_NOT overrides inheritance");
+}
+
+{
+ local @D::ISA = "B";
+ local @D::CARP_NOT = "C";
+ like(A::short(), qr/^Error at B/, "\@CARP_NOT overrides inheritance");
+}
+
+# %Carp::Internal
+{
+ local $Carp::Internal{C} = 1;
+ like(A::short(), qr/^Error at B/, "Short doesn't report Internal");
+}
+
+{
+ local $Carp::Internal{D} = 1;
+ like(A::long(), qr/^Error at C/, "Long doesn't report Internal");
+}
+
+# %Carp::CarpInternal
+{
+ local $Carp::CarpInternal{D} = 1;
+ like(A::short(), qr/^Error at B/
+ , "Short doesn't report calls to CarpInternal");
+}
+
+{
+ local $Carp::CarpInternal{D} = 1;
+ like(A::long(), qr/^Error at C/, "Long doesn't report CarpInternal");
+}