Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Modern::Perl

by massa (Hermit)
on Jan 29, 2009 at 13:03 UTC ( [id://739892]=note: print w/replies, xml ) Need Help??


in reply to Re: Modern::Perl
in thread Modern::Perl

It's not a pragma in core, so the name modern is not an option.
Why o why? With each version of Perl, a new "modern" pragma enabling each and everything would be really nice. So, where do I plea for it to be included in the core?? :-)
[]s, HTH, Massa (κς,πμ,πλ)

Replies are listed 'Best First'.
Re^3: Modern::Perl
by chromatic (Archbishop) on Jan 29, 2009 at 17:55 UTC
    [Where] do I plea for it to be included in the core?? :-)

    You don't. That's the surest path to stagnation and ossification. The module would then have to be backwards compatible until the implosion of Perl 5, and I'm not interested in that.

    When this pulls in other modules such as signatures and Method::Signatures, it'll have non-core dependencies that prevent it from being considered for core, and that's fine too.

      But that is kind of my point. See, foreach version of perl >= 5.12, we should have a modern.pm pragma that will croak unless you have some (modern) CPAN modules installed and at the same time, and it will enable the most-modern things perl+CPAN have to offer at the time.

      This way,

      use modern
      in 5.10 would enable strict/warnings/say/given/err etc, in 5.12 it will enable _that_ and maybe signatures, mro 'c3', in 5.14 ... you get my drift.
      []s, HTH, Massa (κς,πμ,πλ)

        The consensus on p5p seems to be that it's more important for old programs to run unmodified on modern versions of Perl than for modern features of Perl to be available by default. In theory, use 5.10; would enable all of these features for 5.10 programs and use 5.12; for 5.12 programs, but the feature pragma at the heart of that behavior does not enable strict and warnings, and the version number keeps changing as what's "modern" changes.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-23 19:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found