Subject: | Warning "Constant subroutine redefined" shouldn't appear |
Here's the simplest way to reproduce the error.
3 files residing in the same directory:
File check.pl:
#!/usr/bin/perl
use Alex;
use aliased 'Charlie' => 'DB::Sandy';
File Alex.pm:
package Alex;
use aliased 'Charlie' => 'DB::Sandy';
1;
File Charlie.pm:
package Charlie;
1;
Try to execute check.pl. Silly warning appears.
Warning doesn't appear if the alias does not contain ::