&& defined $deprecated_at
&& $compat_version lt $deprecated_at;
- return if $warned{$package}{ $args{feature} };
-
my $msg;
if ( defined $args{message} ) {
$msg = $args{message};
if defined $deprecated_at;
}
- $warned{$package}{ $args{feature} } = 1;
+ return if $warned{$package}{ $args{feature} }{$msg};
+
+ $warned{$package}{ $args{feature} }{$msg} = 1;
local $Carp::CarpLevel = $Carp::CarpLevel + 1 + $skipped;
If you don't explicitly specify a feature, the C<deprecated()> sub uses
C<caller()> to identify its caller, using its fully qualified subroutine name.
-Deprecation warnings are only issued once for a given package, regardless of
-how many times the deprecated sub/method is called.
+A given deprecation warning is only issued once for a given package. This
+module tracks this based on both the feature name I<and> the error message
+itself. This means that if you provide severaldifferent error messages for the
+same feature, all of those errors will appear.
=head1 BUGS