Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: Rewrite Program Using Arrays

by chromatic (Archbishop)
on Mar 26, 2012 at 00:46 UTC ( [id://961565]=note: print w/replies, xml ) Need Help??


in reply to Re: Rewrite Program Using Arrays
in thread Rewrite Program Using Arrays

How about to document the version of Perl on which he tested it?

Replies are listed 'Best First'.
Re^3: Rewrite Program Using Arrays
by Jenda (Abbot) on Mar 26, 2012 at 09:45 UTC

    In that case I'd prefer to see that in the documentation or a comment. By "using" a version number you are not merely saying "I've tested this only with this particular version." What you are effectively saying is more like "I believe this will not work with anything older than X."

    If I see "use 5.12.4;" I assume there was something wrong with even 5.12.3, something that prevents the code to work correctly. So probably I would not bother trying to run it under 5.10.x. On the other hand with a comment about the version tested under, I would try it and only if I end up getting an error I'd take the possible version differences into account.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      You're also documenting to Perl what you expect.

      Remember that much of the difficulty of parsing Perl 5 (and enhancing Perl 5) is that you can only guess as to which features of Perl 5 you expect in any given file without an explicit version declaration. Sure, feature enables keywords, but you also get different semantics in 5.12 and 5.14, for example, with the use of unicode_strings.

      With that said, use 5.12.4; has disadvantages compared to use 5.012;.

      Use 5.12.4; is a habit. Nothing more. I usually do use features like `say`...
      --perl.j
        That's why I default to 5.10.0. I just can't see the benefit of requiring 5.12.4. Even if were really keen on 5.12 features, I'd use use 5.012;. The only time I would write use 5.12.4; if the program needs a bugfix that happened between 5.12.3 and 5.12.4.

Log In?
Username:
Password:

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

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

    No recent polls found