[HRPM] Perl 5.6.1 released

Jeff Duffy jeff at alanne.com
Mon Apr 9 16:48:51 CDT 2001


Some of my favorite additions (from the Changelog):

Nifty stuff:

-  exists() works on subroutine names

 Think about the magic yu can do using this in conjunction with
AUTOLOAD in modules. I'm already thinking about how this can put us
one step closer to true reflection in Perl.


 - exists() and delete() are supported on array elements

 Now you don't have to write code to determine whether you are
looking at a hash or an array in order to test for an element/key.


 - File and directory handles can be autovivified (and close when
they go out of scope)

 I actually wasted half a day on a logging API because I thought this
already worked in Perl 5.6.0.  Oh well.


 - There is now a syntax for explicitly declaring methods as
requiring a lock() call:

sub mymethod : locked method ;

 This is really cool for n-depth nested method calls (like, if you
have a complex structure, say of hashes of hashes, and you assign one
of the innermost vey/pair values to reference the root node, and the
other values are sub refs (method refs, actually), and they shouldn't
be reentrant, then you can use this. Not that I ever have tried that,
of course).



Should have happened long ago:

 - system() and exec() now do the right thing and set $! on failure

 This alone will do away with 50 newbie questions a week.


- They finally did away with that fscking "In string, @example now
must be written as \@example" error!

 Yes, Perl now does what you mean when you type this at array.that,
meaning it interpolates @array into a string representation of the
array, like it should have a year ago. 


 And lots of other cool, cool stuff. It's at
http://public.ActiveState.com/gsar/perl-5.6.1.tar.gz , and the
Changelog is at
http://archive.develooper.com/perl5-porters@perl.org/msg24783.html.

Jeff

-- 
 Jeff Duffy
 jeff at alanne.com




More information about the Norfolk-pm mailing list