Tag Archives: p5p

Patching the Perl core for lazy file handle objects

Last night I was inspired to patch the Perl core to load IO::File on demand when calling a method on a file handle would otherwise die. This effectively makes file handles actual "lazy" IO::File objects. If you want to use file handles procedurally, you never need IO::File. But if you try to treat handles as [...]

Posted in p5p, perl programming | Also tagged , | 5 Responses

What's New in Perl 5, Version 13 (updated)

I've updated my Perl 5, Version 13 talk to include the latest new features from 5.13.6 and 5.13.7. Some of the highlights: New regex modifiers to force unicode or locale-specific semantics (5.13.6) Regular expression retain original semantics when interpolated later (5.13.6) Array and hash functions (push, pop, keys, etc.) work on array and hash references [...]

Posted in p5p, perl programming | Also tagged , | Leave a comment

Bootstrapping CPAN.pm using HTTP::Lite

One of my goals for Perl 5.14 that I've discussed with Jesse Vincent and Andreas Koenig is getting CPAN.pm to be able to bootstrap itself in a fresh perl installation without relying on external command line tools or FTP. LWP is too big a distribution to bundle into the core, but HTTP::Lite is a focused [...]

Posted in cpan, p5p, perl programming | Also tagged , | 5 Responses

New prototype accepted; next patch almost done

My patch for a new perl prototype was accepted and should be in Perl 5.13.7 in November. From the change log: Add single-term prototype The C prototype is a special alternative to C that will act like C when given a literal array or hash variable, but will otherwise force scalar context on the argument. [...]

Posted in p5p, perl programming | Also tagged , | 1 Response

Why I want a new prototype in the perl core

Most of the time, you shouldn't use Perl's function prototypes. They aren't function signatures the way you expect. Instead, they mostly help the parser understand how to interpret arguments using the right context. Here is a simple example: The '$' prototype says that foo takes a single argument in scalar context. Consider this: If your [...]

Posted in p5p, perl programming | Also tagged , | 4 Responses

© 2009-2013 David Golden All Rights Reserved