Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1034208]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2018-01-19 02:36 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (215 votes). Check out past polls.