Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Hrmmm (Score:2, Insightful)

    This isn't too bad - All you need to do is call defined on the return value and you have a clean test for whether a module call has succeeded. It could be much worse ... They might not have documented this behaviour or indeed any module return values at all.

    All of this is moot if the module doesn't work though

    :-)

    • Re:Hrmmm (Score:3, Informative)

      Isn't too bad? - I guess so. But they are stomping in the main:: namespace (rather than the caller's). Using fixed variables means that they are not threadsafe (at least in a 5.005 threads world, or anything non-perl that has POSIX-like threads semantics). Either point alone would be enough for me to toss this code back.

      • But they are stomping in the main:: namespace (rather than the caller's). Using fixed variables means that they are not threadsafe (at least in a 5.005 threads world, or anything non-perl that has POSIX-like threads semantics).

        Wholly agreed. The practice of manipulating variables within the main:: namespace would be something which I too would question. Not necessarily from the perspective of thread safety but for more pragmatic reasons relating to professional (developer) courtesy - Playing in other people's gardens without permission (by way of variables exported at the request of the calling code) is simply not nice.