=head1 This Week on perl5-porters - 15-21 September 2008 I -- Michael G. Schwern, wanting numeric upgrades to JFDI. =head1 Topics of Interest =head2 Y2038 branch Michael G. Schwern's work (in a git branch) on Y2038+ dates continued apace, with H.Merijn Brand adding some configuration hooks for minimum and maximum date values, and discussions of how to set up tests to check for sane values in the year 803619167319 or so, especially if daylight savings is still in place. fresh dates http://xrl.us/oscvv =head2 Blead on OpenSUSE 11.0/64 H.Merijn Brand reported that the only failure on this platform for 5.8.9-to-be was one test in C. On the other hand, C was collapsing in a heap on blead, but H.Merijn was puzzled as to why, since he was using the same configuration settings, and there has been no changes under F between 5.8.x and blead. Andy Dougherty thought that 5.8.x's C was missing ODBM_File altogether, but blead's was a little more aggressive and found a header that led it to conclude it could try and build the extension, and this revealed that SUSE's dbm compatibility is not up to par. not ODBC http://xrl.us/oscvx =head2 C behaviour with C Paul Fenwick asked what C should do in the light of blocking and non-blocking file lock acquisitions, reasoning that calling flock() in blocking mode means "I need this lock", whereas calling it in non-blocking mode is a question: "Can I get this lock right now?". From this, he could come up with sensible behaviour for C. The main sticking point was the possibility that a C call returns the C error, which is not really an error, or at least, not something worth dying for. There was a long discussion about exceptions, errors and opportunistic code, but the main point to take home is when Zefram pointed out that if autodie's behaviour for flock is unsuitable, one is always free to use a C to switch it off and handle it manually. blocked on flock http://xrl.us/oscvz One may assume that Paul had been pulling his hair out over the issue and that the documentation wasn't much help. So he improved documentation for C in F and tidied up the code examples for by using lexical filehandles rather than globs, checking for errors, and using constants rather than magic numbers. aiding the cargo cult http://xrl.us/oscv3 =head2 Is the prototype for C wrong? Paul then looked at C in trying to figure out how to override it for C. His version could not take a typeglob as a parameter, as the parser thought it was a bareword, due to C's prototype. He missed the fact that C can also work with the name of a file, not just a file handle, which is why the prototype had to fudge matters slightly. This reminded Jan Dubois of a subtlety he encountered with C a while ago: C will remove the file named by C<$_>, but C does nothing. The reason for this oddity is to prevent C from unlinking whatever C<$_> points to, should C<@stuff> happen to be empty. Jan gave up trying to implement the same semantics in pure Perl, instead concluding that there are some core functions that are impossible to duplicate. And perl 5.10's C<_> prototype doesn't help either, given that it imposes scalar context. Rafaël wondered what would happen (what would break) if he tweaked F to change the prototype to something more suitable for Paul's need. Paul wondered too. trunk call http://xrl.us/oscv5 =head2 Practical considerations in changing the integer upgrade path? Michael G. Schwern asked for people's considered opinions on how painful it would really be to change the integer upgrade path from signed -E unsigned -E double -E C to signed -E long long (or whatever) -E arbitrary precision. Specifically, he wondered how one creates a new SV type, what impact would this have on the code base, and whether it would break XS code. Yuval Kogman answered all three questions quite clearly. And there ended the thread. and python does it right http://xrl.us/oscv7 =head2 Change 30638 introduces regression Following on from a change for bug #59168 reported by Father Chrysostomos and an error in the test suite for C, Nicholas Clark backed the regressing change out and added some tests to identify the problem so that that future attempts don't cause the same breakage. Dave Mitchell said he had a cold, and was thus unlikely to look at things for a while. get well soon http://xrl.us/oscv9 =head2 C<$*> is no longer supported Rory Kingan was worried about some code that crawled out of the woodwork complaining about C<$*> no longer implemented in 5.10. Aristotle Pagaltzis looked at the regular expressions Rory posted and concluded that it was just cargo cult code that could be safely deleted. night of the living regexp http://xrl.us/oscwb =head2 Milestone: metaconfig now under GIT H.Merijn Brand thanked Sam Vilain and Abhijit Menon-Sen for helping him get C hosted entirely in git (at L), and declared its Perforce branches officially closed. it's dead, jim http://xrl.us/oscwd =head2 Syntax incompatibility (5.8.8 vs 5.10) Edward Peschko wrote about a problem with C that was complaining about a use of C. This can be traced to a decision taken over three years ago to remove the loading of C from C. Since the author of the module sees no reason to release a new version of the module just to fix this problem, it is unlikely that it will be fixed in the near future. Certainly there is no desire to put C back into C, and C can be used by authors to find such problems (where client code loads module X, which in turn loads module Y, and then the client code calls routines in Y without having loaded it explicitly). EWONTFIX http://xrl.us/oscwf =head1 TODO of the week Here's a simple task that requires no C knowledge. =head2 Fix tainting bugs Fix the bugs revealed by running the test suite with the C<-t> switch (via C). (In fact, you don't even have to fix all of them, or most of them. Just updating F (patches welcome!) with the list of problematic files would be a start). =head1 Patches of Interest =head2 C wants C<-fPIC> on x86_64 Vincent Pit offered a patch to get Intel's C compiling XS modules correctly. Apparently this went nowhere. http://xrl.us/oscwh =head2 F Can't call method C without a package or object reference Jari Aalto uncovered a problem in 5.10 with an undefined file descriptor in C. He supplied a patch for it, which appears to be stuck in limbo. http://xrl.us/oscwj =head2 Don't reuse temp files in tests Jerry D. Hedden found some more tests that had problems with names of temporary file names being reused, so he changed them to use genuine temporary file names. Jan Dubois pointed out that this was likely to be a win for Windows systems that have on-access virus scanning, which can interfere with files that are rapidly deleted and recreated. do not use a random method to generate random filenames http://xrl.us/oscwm =head2 Show using C in C SYNOPSIS brian d foy noted that the documentation recommends using C to clean up, but the supplied examples don't. So he amended them to provide baseline best practices for people to use. do as i say not as i do http://xrl.us/oscwo =head1 New and old bugs from RT =head2 Volunteer for fixing the "Unicode" bug (#58182) Back in August, when I was on my summ(?:ary|er) break, Karl Williamson filed a bug report relating to the inconsistent handling of 8-bit characters in strings during case mapping when no locale has been specified. For instance, C returns itself (ŕ, or lowercase a grave) rather than Ŕ (uppercase A grave). And this, regardless of whether there are any multi-byte characters. As a consequence, C<"\x{e0}" =~ /\x{c0}/i> fails to match. Moritz Lenz explained that this was a known bug but unfortunately was not fixable because too much code relies on the current behaviour (which Karl summarises quite nicely in the original bug report). Moritz showed how one could make things work, at the expense of a little make-work code involving C. Juerd Waalboer mentioned that it is fixable and scheduled for implementation in perl 5.12, and that such backwards compatibility issues have been noted in C. Dave Mitchell sketched out how one might go about producing an implementation for this, which would involve breaking out the semantically overloaded C flag from C and hanging it out in an auxilliary structure, which could be used to store additional bits of information such as character set, encoding, locales, UTF-8 caches and more, since there's no space for such extravagances in a standard SV. Juerd and Glenn Linderman weren't sure it this would end up being a win. Glenn in particular thought that locale and encoding metadata should probably be associated with file handles and the like. prologue http://xrl.us/oscwq Fast-forward to this week, when Karl reported back to the list, explaining that he'd implemented the change in behaviour in a copy of 5.10 source that seemed to do the trick, and asked the list where to go from here. In a nutshell, his patch extends ASCII semantics to the characters in the 128..255 Latin1 characters. Glenn Linderman explained that Karl should use a pragma to introduce this new change for code that wants to use it. Rafaël amended this suggestion by saying that the Unicode situation as it stands at the moment is such a mess that no pragma would be required for 5.12: it would just Do The Right Thing and backwards compatibility be damned. If the change was back-ported to the 5.10 track, then a pragma would be required in order to switch to the new behaviour. Andreas König pointed out that Karl should base his patches on blead, rather than 5.10. Rafaël said that starting a branch from C would be as good a place as any from which to start. Juerd thought that Karl should have no qualms about breaking code with his changes, since a certain amount of reverse breakage would may occur, whereby existing buggy code suddenly begins to work correctly... famous last words "I just have to fix this bug" http://xrl.us/oscws =head2 Building Perl 5.10.0 in AIX 5.3 using C<-Duseshrplib> option gives C (#58858) Tippa found a problem that (s)he was able to fix by a minor tweak to F and so filed a bug report. Jan Dubois repackaged the fix as a patch to F. H.Merijn Brand confirmed the problem and the fix, and committed it as change #34379. AIX en provence http://xrl.us/oscwu =head2 3-arg re-open drops IO layers (#58920) Frank Meisschaert discovered that if STDOUT is redirected to a UTF-8 file using the 3-argument form of C, the UTF-8 layer does not get set. The work-around is to close STDOUT explicitly beforehand. Michael G. Schwern confirmed that the problem exists from 5.8.8 to 5.10.0 to blead on OS/X . not a team (p)layer http://xrl.us/oscww =head2 C loops and eats all memory (#58942) Ambrus Zsbán discovered a nifty way to have perl eat all available memory. Nicholas Clark reported that the problem had already been identified and fixed in blead. The correction will be backported to 5.10.1 and 5.8.9, which Nicholas said should be out within a month. that's not a feature! http://xrl.us/oscwy =head2 Typo in CGI(3perl) man page (#59132) Reuben Thomas identified two typos (in bug reports #59128 and #59130) which were either already fixed in blead, or fixed thanks to his report. Reuben found another typo in C, for which Renée Bäcker produced a small patch, although this will have to be pushed upstream to Lincoln Stein, C's maintainer. meanwhile back at the CSHL http://xrl.us/oscw2 He also found a typo in C (filed in bug #59134). the proof is in the reading http://xrl.us/oscw4 =head2 Perl5 Bug Summary Heading north. 268 new + 1032 open = 1300 (+6 -2) http://xrl.us/oscw6 http://rt.perl.org/rt3/NoAuth/perl5/Overview.html =head1 New Core Modules =over 4 =item constant 1.16 Sébastien Aperghis-Tramoni uploaded what is essentially a documentation fix. Applied to blead by H.Merijn Brand. http://xrl.us/oscw8 =item podlators 2.1.4 Russ Allbery fixed up the test suite to skip Unicode tests below 5.8, since C doesn't support UTF-8 encoding with those versions, and rearranged things to deal with Red Hat C idiosyncracies. http://xrl.us/oscxa This followed 2.1.3, which was Russ's first attempt at addressing error handling (emitting to STDERR instead of creating a POD ERRORS section), along with the errors that H.Merijn brought up recently, where an otherwise flawless smoke run was choking on UTF-8 locales. http://xrl.us/oscxc =back =head1 In Brief Gábor Szabó chose C as the name for his B. now available on CPAN http://xrl.us/oscxe Alexandr Ciornii set up B>. The previous module on CPAN is 9.5 years old. now available on CPAN http://xrl.us/oscxg Paul Marquess was worried about the complexities and potential for breakage if he created a composite distribution that contains all his B / C / C> goodness. Fortunately the solution is simple and robust. now available on CPAN http://xrl.us/oscxk Michael G. Schwern reported on B and the C<\@foo> prototype>, and how nice it all was. now available on CPAN http://xrl.us/oscxn =head2 Last week's summary http://xrl.us/oru8q =head2 About this summary This summary was written by David Landgren. Weekly summaries are published on F and posted on a mailing list, (subscription: F). The archive is at F. Corrections and comments are welcome. If you found this summary useful, please consider contributing to the Perl Foundation or attending a YAPC to help support the development of Perl.