Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: 5.6 versus 5.005

by gnat (Beadle)
on Sep 02, 2000 at 04:25 UTC ( [id://30836]=note: print w/replies, xml ) Need Help??


in reply to 5.6 versus 5.005

The bugs that I remember being described in 5.6 are:
  • Some odd regexp bugs caused by the new RE engine. The situations they cropped up in seemed to be rare, but a few people (5ish?) reported running into them.
  • CPAN modules with XS components, that had already been installed, sometimes wouldn't work. I believe the solution was to rebuild the module or to rebuild Perl with an option. I can't remember which.
  • Unicode support is only half-there for string operations (which shouldn't break much, seeing as how there was no Unicode support in 5.005 :-)
  • The lexical warnings stuff never seemed to work for me ("no warnings" didn't stop warnings).
My advice is to stay at 5.005_03 until 5.6.1 comes out, simply because installing a new version of Perl *always* is a pain in the butt, even when it goes smoothly. It's work you don't want to have to do twice, a month apart.

5.6 has a whole lot of sexy new features:

  • Autovivifying file handles. No more screwing with typeglobs, if you want to open a filehandle and store the filehandle in a scalar:
    open my $fh, "< foobar" or die;
  • 3-arg open to separate file mode from filename:
    open my $fh, "<", $filename or die;
  • POSIX character classes, and extensions to the POSIX character classes.
  • Unicode everywhere. Coolest is \N in double quoted strings for named characters: "I \N{heavy-black-heart} Perl" and Unicode character properties.
  • our() keyword, a lexically-scoped version of "use vars".
  • version strings, a way to make binary strings that can hold byte tuples:
    $str = v3.14; $str = 12.1.128.19; # v not needed if multiple dots
  • threading is damn near usable (everything but $1 et al works with threads, I believe). People have actually been using it.
  • compiler is closer, but still needs work.
  • BEGIN and END have friends, CHECK and INIT. CHECK blocks are done as last step of compilation phase. INIT blocks are done as first step of execution phase.
  • warnings module lets you enable and disable warnings for a block, also lets your module specify categories for the warnings it issues.
  • lvalue subroutines:
    foo() = 5; print foo(); foo() *= 2; print foo();
    It's a subroutine that returns a value, but you can change that value!
I wrote the "what's new in 5.6" section of a new class, "Advanced Topics In Perl", so it's all fresh in my mind :)

Cheers;

Nat

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found