Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
But no, I wasn't describing use 5.012;, I was talking about strict in Perl 5.12.
Now I'm utterly confused, and I've no longer the faintest clue what you're trying to say. If I run the binary that I build with the source that comes in the perl 5.12 tarball, I only get strictness by either 1) doing use strict;, and 2) use 5.012;. 1) certainly isn't new to 5.12, and you seem to disagree with me on 2). Can you show some code that shows strict on by default, with the use 5.012; clause?
Actually, some of the regex and unicode changes require use 5.xxx; because they aren't backwards compatible.
Could you elaborate on this one? Which regexp or Unicode feature is only available after doing a use 5.012;? According to man feature, the only features are:
   The ’switch’ feature
       "use feature 'switch'" tells the compiler to enable the Perl 6
       given/when construct.

       See "Switch statements" in perlsyn for details.

   The ’say’ feature
       "use feature 'say'" tells the compiler to enable the Perl 6 "say"
       function.

       See "say" in perlfunc for details.

   the ’state’ feature
       "use feature 'state'" tells the compiler to enable "state" variables.

       See "Persistent Private Variables" in perlsub for details.

   the ’unicode_strings’ feature
       "use feature 'unicode_strings'" tells the compiler to treat all strings
       outside of "use locale" and "use bytes" as Unicode. It is available
       starting with Perl 5.11.3.

       See "The "Unicode Bug"" in perlunicode for details.
Now, checking perlunicode, it's suggested that if the unicode_strings feature is in effect, Unicode semantics will be in effect on all strings (as long as use locale and use bytes aren't in effect), in particular when it comes to /\w/ and lc/uc. But that doesn't actually seem to work:
$ perl -wE 'my $foo = "ë"; say $foo =~ /\w/ || 0; say uc $foo' 0 ë $ perl -wE 'my $foo = "ë"; utf8::upgrade $foo; say $foo =~ /\w/ || 0; +say uc $foo' 1 ë $
Note though that I wasn't thinking of this feature when I was talking about Unicode changes - I was thinking about Perl 5.12 implementing Unicode 5.2 (as opposed to Unicode 5.0.0 in 5.10).
Let's say it was impossible to export variables. Would you still say that use strict 'vars'; should be done by a linter instead of Perl itself?
Probably not. The problem is that "use strict 'vars';" creates compilation errors. Linters typically don't check for that - they warn about valid, but (for some value of) questionable constructs. qw[hello, world] is certainly valid, and some think it to be questionable.

In reply to Re^8: My questions: new to perl by JavaFan
in thread My questions: new to perl by Monk_perl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others musing on the Monastery: (10)
    As of 2019-12-05 15:56 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Strict and warnings: which comes first?



      Results (151 votes). Check out past polls.

      Notices?