The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I've seen that practice also. I think it can make sense if some_function is the only place SomeModule is used. That way if the sub changes so that it doesn't use that module anymore, you can get rid of the use line right there. That said, I've never done it myself. The top of any module tends to look like this:
I put the pragmas at the very top. Local modules are grouped together, and external modules are grouped together. I'd rather have everything at the top like that. The practice you show is liable to get cluttered, using the same module in multiple places. That doesn't cost anything in terms of resources, but I think it's a small speedbump to comprehension. In reply to Re: Code style advice: where to put "use" statements?
by kyle
|
|