Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: What is the impact of 5.18.0?

by tobyink (Abbot)
on May 19, 2013 at 11:13 UTC ( #1034208=note: print w/ replies, xml ) Need Help??

in reply to What is the impact of 5.18.0?

I'm using 5.18.0 as my main development Perl already.

Lexical subs seem like they'll be a nice new feature, but it'll probably be some time before they're suitable for production code.

That said, Perl 5.18 seems to have brought more upgrade annoyances than Perl 5.16 did. Introducing warnings for smart match is annoying. Especially when they're difficult to disable. (no warnings "experimental::smartmatch"; seems easy, but dies in older versions of Perl, so you need something like no if $] >= 5.018, warnings => "experimental::smartmatch";.). Yet another annoyance with that makes me wonder why I bother enabling warnings to begin with (strict catches far more errors than warnings ever does).

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Comment on Re: What is the impact of 5.18.0?
Select or Download Code
Replies are listed 'Best First'.
Re^2: What is the impact of 5.18.0?
by QM (Vicar) on May 20, 2013 at 08:17 UTC
    no if $] >= 5.018, warnings => "experimental::smartmatch";

    I'm surprised at this syntax for a conditional no. Is it documented somewhere?

    Update: Ah, I found it in use.

    Quantum Mechanics: The dreams stuff is made of

      :) perldoc -f no
      perldoc if
Re^2: What is the impact of 5.18.0?
by kcott (Abbot) on May 26, 2013 at 02:57 UTC

    Instead of turning off all warnings, you can just disable the experimental ones with:

    no if $] >= 5.018, warnings => "experimental";

    While I don't necessarily advocate this course of action, I think it would be preferable to a general "no warnings;".

    -- Ken

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2015-07-28 02:25 GMT
Find Nodes?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...

    Results (251 votes), past polls