good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Here's one that caused me to sit back and go, "Hmmmm...".
Reading through some well-distributed code I found this near the top of the main script: Now, although I have never seen the little meme in that BEGIN block before, I understand what it is doing. (That's not the question.) My question is this: "is this a Good Practice?" What is the point? So far as I can see, this bit of source-hiding simply saves a few keystrokes near the top of the file. And if done to access it could lead to some maintainance annoyances. Imagine adding several module paths to @INC and then trying to find the modules later: "Let's see, I wonder if the module referred to in 'use Parser' is XML::Parser or HTML::Parser..." It's cute. It's slick. But is it Good? David Update: Thanks to the responders below for confirming my misgivings. I'm open to learn new approaches, but this one felt wrong from the get-go. In reply to Hiding the Module 'Path' by dvergin
|
|