The final line of a required module isn't in void context - it's the return value of the require. Try putting something else there and you'll see there's no warning. I worked with a guy who put (unfortunately copyrighted) poetry in a string at the end of his modules.
Re^2: Why no warnings for 1 in void context?
Replies are listed 'Best First'.