Does
My::Module use Carp? Consider a simple module (Example.pm):
package Example;
use strict;
use warnings;
use Carp;
sub with_warn { warn "inside with_warn"; return; }
sub with_carp { carp "inside with_carp"; return; }
1;
and a script using it:
#!/usr/bin/perl
use strict;
use warnings;
use Example;
Example::with_warn();
Example::with_carp();
warn "inside main script";
We get:
inside with_warn at Example.pm line 5.
inside with_carp at /path/to/warn_carp.pl line 7
inside main script at /path/to/warn_carp.pl line 8.
The second warn is issued by the module, but the perspective is that of the original caller. Of course, I could be totally missing the differences with respect the embedding world.
Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
Don't fool yourself.