Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: Huffman coding in pure Perl (why?)

by w-ber (Hermit)
on Mar 04, 2007 at 20:22 UTC ( #603129=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Huffman coding in pure Perl (why?)
in thread Huffman coding in pure Perl

Hmm. To be frank, I didn't know the semantics of the line is "not guaranteed to work in previous versions". I thought it was more like "only tested with versions this and above", and since I only have Perl 5.8 (5.8.8 to be exact), it was a natural thing to do.

I have nothing against older Perl versions, but I feel responsible if I don't clearly document it that I have only tested the module with Perl 5.8, and someone runs the module with an old version where it doesn't work.

--
print "Just Another Perl Adept\n";


Comment on Re^4: Huffman coding in pure Perl (why?)
Re^5: Huffman coding in pure Perl (why?)
by tye (Cardinal) on Mar 04, 2007 at 21:34 UTC

    Then perhaps you need to think about what "use 5.008;" actually does. First, it is a compile-time equivalent of "require 5.008" (use, especially in this case, is mostly just a compile-time version of require). Does your module "require 5.008"? You don't know. And yet you want to "clearly document" that your module requires 5.008?

    If I have, for example, 5.6.1, what is the difference for me between you including "use 5.008" or not including it in your module? With "use 5.008", if I try to use your module I get told:

    Perl v5.8.0 required--this is only v5.6.1

    and things refuse to do anything else. How does that clearly document "I haven't tested this prior to 5.8" ? It doesn't. It simply prevents me from using your module as is. It "clearly documents" "This module is known to not work prior to 5.8, but as to why it doesn't work, we have nothing to say", which isn't very clear documentation.

    Without "use 5.008", I'll get told something useful if you use some feature that wasn't present in my version of Perl, or I'll see one of your unit tests fail in the unlikely situation that you wrote code that compiles in my old version of Perl but does something different in it -- much attention is paid to making sure that valid Perl code doesn't break (do something different) when Perl is upgraded, after all.

    What else does that imply? I means that any CPAN tester who does an automated test of your module will get a simple failure for versions of Perl prior to 5.8. So, if I wondered if your module worked on 5.6.1, I'd likely look at CPAN tester reports for 5.6.1 and your "use 5.008" prevents such tests from documenting anything about how your code would work in 5.6.1 except to document the fact that you included "use 5.008" in your source code.

    So please stop doing that. If you want to document that you haven't tested prior to 5.8, say that in your documentation. Don't prevent prior versions of Perl from even having a chance to try to compile your code.

    - tye        

      Alright, that makes it very clear. Thank you. Removed it from here, and I'll think thrice before using it again in other modules.

      --
      print "Just Another Perl Adept\n";

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-07-30 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (241 votes), past polls