--- t/comp/require.t.orig	2007-12-18 02:47:08.000000000 -0800
+++ t/comp/require.t	2009-05-13 21:20:43.000000000 -0700
@@ -15,7 +15,7 @@
 
 my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0;
 my $Is_UTF8   = (${^OPEN} || "") =~ /:utf8/;
-my $total_tests = 49;
+my $total_tests = 50;
 if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; }
 print "1..$total_tests\n";
 
@@ -258,6 +258,20 @@
     }
 }
 
+#  [perl #49472] Attributes + Unkown Error
+
+{
+	do_require
+		'use strict;sub MODIFY_CODE_ATTRIBUTE{} sub f:Blah {$nosuchvar}';
+	my $err = $@;
+	$err .= "\n" unless $err =~ /\n$/;
+	unless ($err =~ /Global symbol "\$nosuchvar" requires /) {
+		$err =~ s/^/# /mg;
+		print "${err}not ";
+	}
+	print "ok ", ++$i, " [perl #49472]\n";
+}
+
 ##########################################
 # What follows are UTF-8 specific tests. #
 # Add generic tests before this point.   #
