in reply to Module mechanics question

The reason you differentiate 'foo' and 'bar' into separate modules is because they do different things. That creates a possibility that either 'foo' or 'bar' will be re-used in separate programs.

Therefore you should have use Modern::Perl in each file, so they will be modern even if used separately from each other.

After all, you used to tolerate two standard lines in each module to get 'warnings' and 'strict'; now one line in each module gets you those and more.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Replies are listed 'Best First'.
Re^2: Module mechanics question
by Logicus (Initiate) on Aug 17, 2011 at 17:57 UTC
    In this case package foo is one of many dependant on bar and not intended or designed to function without it, but I can see what your saying. If foo were reusable as a standalone package then yes, it would be better to have the Modern::Perl pragma in there.