in reply to Re^4: Writing a better Modern::Perl
in thread Writing a better Modern::Perl
I may not have expressed myself well enough. What I mean is that sometimes I put a "use 5.006;" (to take an example) on the code, not because it uses a feature that isn't present in 5.005, but because it uses a construct that triggers a bug in 5.00504. (I remember a long debugging session related to regexes, where I was initially unable to reproduce to reported issue - it turned out the regex triggered a bug in one of the latest minor releases of the previous major release).or "this code will trigger a bug in 5.YYY, which was fixed in 5.XXX".There wouldn't be a need for a pragma in that scenario. features is used for backwards incompatible changes, not pure bug fixes.
What I mean is the following:Now it mean "if you try to run this with 5.YYY, I'm going to keep quiet if you screw up". Not what I expect of a helpful language.I don't know what you mean. What errors does use 5.xxx; silence?
Note the absence of 'use strict;', because it's implied by the use 5.012. Someone comes along, who notices the code actually runs fine under 5.10 (its extensive test suite passes). Removal of the 'use 5.012' (or changing it to 'use 5.010') means that the code isn't protected by 'use strict'. Hence, any further modification of the code is subject to the same dangers any code without 'use strict' is.use 5.012; use warnings; ... code ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Writing a better Modern::Perl
by chromatic (Archbishop) on Oct 08, 2010 at 20:20 UTC | |
by ikegami (Patriarch) on Oct 08, 2010 at 21:11 UTC | |
by chromatic (Archbishop) on Oct 08, 2010 at 21:31 UTC | |
by BrowserUk (Patriarch) on Oct 08, 2010 at 22:52 UTC | |
by ikegami (Patriarch) on Oct 09, 2010 at 01:18 UTC | |
|
Re^6: Writing a better Modern::Perl
by ikegami (Patriarch) on Oct 08, 2010 at 20:59 UTC |