http://qs321.pair.com?node_id=727113


in reply to Circular dependencies when using the perl syntax checker

This is a bit of a late post, but I've just stumbled on this thread because I had the same problem. Other posts explained the cause of it, so I won't go into that. I'd just like to point out a workaround which seems to work for me: Say, we have module Foo which resides in its own file Foo.pm. You can put the following code right below the package statement.

BEGIN { $INC{"Foo.pm"} ||= __FILE__ }

Essentially, this forces an entry in %INC when the file is compiled. Use with care.

Cheers,
Steffen