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

Replies are listed 'Best First'.
Re^2: What is the impact of 5.18.0?
by QM (Parson) 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 (Chancellor) 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