http://www.perlmonks.org?node_id=389301


in reply to Recursive use causes subroutine redefinition

Nothing is wrong with your recursive uses; the problem is that you are also loading Foo.pm as a script, bypassing the multiple load checks that exist for require or use. The same thing happens without the recursion:
$ cat>Baz.pm package Baz; use strict; use warnings; use Baz; sub baz { } 1; $ perl Baz.pm Subroutine baz redefined at Baz.pm line 5.
If you are going to use the same file both via use or require and as a main script or via do, you should manually put a "BEGIN { $INC{Module.pm} ||= __FILE__ }" in Module.pm before any possible use/require.