Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Module mechanics question

by TomDLux (Vicar)
on Aug 15, 2011 at 15:17 UTC ( [id://920311]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://920311]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 09:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found