Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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 warnings.pm 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
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.

    -QM
    --
    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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2014-08-31 08:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls