runrig's Friends' Journals
http://use.perl.org/~runrig/journal/friends/
runrig's Friends' use Perl Journalsen-ususe Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners.2012-01-25T02:14:34+00:00pudgepudge@perl.orgTechnologyhourly11970-01-01T00:00+00:00runrig's Friends' Journalshttp://use.perl.org/images/topics/useperl.gif
http://use.perl.org/~runrig/journal/friends/
The mod_perl debugger you've always wanted
http://use.perl.org/~jjore/journal/40458?from=rss
<p>"The mod_perl debugger you've always wanted" is on my new blog at: <a href="http://bit.ly/agzWSU">http://bit.ly/agzWSU</a></p>jjore2010-07-22T17:53:07+00:00journalUnicode in Perl, FTW (Я очень ра
http://use.perl.org/~jjore/journal/40438?from=rss
<p>Hi,<br>This blog post is actually at <a href="http://blogs.perl.org/users/josh_ben_jore/2010/07/unicode-in-perl-ftw.html">http://blogs.perl.org/users/josh_ben_jore/2010/07/unicode-in-perl-ftw.html</a>.</p>jjore2010-07-07T06:01:11+00:00journalUnder the covers of perldoc
http://use.perl.org/~jjore/journal/40437?from=rss
<p>Hi, I posted to my new blog at blogs.perl.org:</p><p><a href="http://blogs.perl.org/users/josh_ben_jore/2010/07/under-the-covers-of-perldoc.html">http://blogs.perl.org/users/josh_ben_jore/2010/07/under-the-covers-of-perldoc.h<nobr>t<wbr></nobr> ml</a></p>jjore2010-07-07T05:44:28+00:00journalAnnouncing CPAN Testers 2.0
http://use.perl.org/~barbie/journal/40435?from=rss
<p>After 6 months of development work, following 2 years worth of design and preparation, CPAN Testers 2.0 is finally live.</p><p>With the rapid growth in CPAN Testers environments and testers over the past few years, the previous method of posting reports to a mailing list had reached a point where the scalability was no longer viable. This was recognised several years ago and discussions for a new system had already begun, with the view that reports should be submitted via HTTP.</p><p>At the Oslo QA Hackathon in 2008, David Golden and Ricardo Signes devised the Metabase, with the design work continuing at the Birmingham QA Hackathon in 2009, where David and Ricardo were able to bring others into the thought process to work through potential issues and begin initial coding. A number of releases to CPAN and Github followed, with more people taking an interest in the project.</p><p>The Metabase itself is a database framework and web API to store and search opinions from anyone about anything. In the terminology of Metabase, Users store Facts about Resources. In the Metabase world, each CPAN tester is a User. The Resource is a CPAN distribution. The Fact is the test report. Today that’s just the text of the email message, but in the future it will be structured data. The Metabase specifies data storage capabilities, but the actual database storage is pluggable, from flat files to relational databases to cloud services, which gives CPAN Testers more flexibility to evolve or scale over time.</p><p>Meanwhile the CPAN Testers community was also attracting more and more interest from people wanting to be testers themselves. As a consequence the volume of reports submitted increased each month, to the point that the perl.org mail server was struggling to deal with all the mailing lists it hosted. The cpan-testers mailing list was submitting more posts in one day than any other list submitted in a month (in a year in some cases). Robert and Ask, very reasonably, asked if the testers could throttle their submissions down to 5k report posts a day, and set a deadline of 1st March 2010 to switch off the mailing list.</p><p>David Golden quickly took on the task to envisage a project plan, and work began in earnest in December 2009. With less than 3 months to the cut-off date, there was a lot of work to do. David concentrated on the Metabase, with Barbie working on ensuring that the current cpanstats database and related websites could move to the Metabase style of reports. Despite a lot of hard work from a lot of people, we unfortunately missed the 1st March deadline. Having throttled report submissions to a more manageable level, and although not complete, the target for HTTP submissions was in sight, Robert and Ask were very understanding and agreed to keep us going a little while longer.</p><p>Throughout March and April a small group of beta testers were asked to fire their submissions at the new system. It ironed out many wrinkles and resulted in a better understanding of what we wanted to achieve. The first attempts at retrieving the reports from the Metabase into the cpanstats database began in April, and again highlighted further wrinkles that needed to be addressed. After a month of hard testing and refinement, we finally had working code that went from report submission by a tester, storage into the Metabase, retrieval into the cpanstats database and finally presentation on the CPAN Testers family of websites.</p><p>During June the process was silently switched from testing to live, allowing reports to be fed through into the live websites. Due to the ease with which the new style reporting fit into the existing system, the switch largely went unnoticed by the CPAN testers community as well as the Perl community. A considerable success.</p><p>The CPAN Testers eco-system is now considerably larger than those early days of simply submitting handwritten reports by email to a mailing list, and the work to get here has featured a cast of thousands. Specifically for CPAN Testers 2.0, the following people have contributed code, ideas and effort to the project over the past six months:</p><ul>
<li>Andreas König</li><li>Apocalypse</li><li>Ask Bjørn Hansen</li><li>Barbie</li><li>Chris Williams</li><li>Dan Collins</li><li>David Cantrell</li><li>David Golden</li><li>Florian Ragwitz</li><li>H.Merijn Brand</li><li>Jon Allen</li><li>Lars Dɪᴇᴄᴋᴏᴡ 迪拉斯</li><li>Léon Brocard</li><li>MW487</li><li>Nigel Horne</li><li>Ricardo Signes</li><li>Richard Dawe</li><li>Robert Spier</li><li>Serguei Trouchelle</li><li>Shlomi Fish</li><li>Slaven Rezić</li></ul><p>Barbie and David would like to thank everyone for their involvement. Without these guys CPAN Testers 2.0 would not have been possible. Thanks to everyone, we can now look forward to another 10 years and more of CPAN Testers.</p><p> <a href="http://www.cpantesters.org/">CPAN Testers</a> now holds over 7.5 million test reports covering nearly 11 years worth of testing Perl distributions. There have been over 1,000 testers in that time, and every single one has helped the CPAN Testers project to be the largest single community supported testing system of any programming language. For a full list of everyone who has contributed, visit the <a href="http://stats.cpantesters.org/testers.html">CPAN Testers Leaderboard</a>. A huge thank you to everyone.</p><p>With the Metabase now online and live, we can now announce an absolute deadline to close the mailing list. This is currently set as 31st August 2010. After this date all submissions via email will be rejected, and testers will be encouraged to upgrade their testing tools to take advantage of the new HTTP submission system. Many of the high volume testers have already moved to the new system, and we expect nearly everyone else to move in the next month. We will be tailing the SMTP submissions to catch those who haven't switched, such as some of the more infrequent testers, and warn them of the deadline.</p><p>More work is planned for CPAN Testers, from further validation and administration of reports, to providing more functionality for alternative analysis and search capabilities. Please check the <a href="http://blog.cpantesters.org/">CPAN Testers Blog</a> for our regular updates.</p><p>If you'd like to become a CPAN Tester, please check the <a href="http://wiki.cpantesters.org/">CPAN Testers Wiki</a> for details about setting up a smoke testing environment, and join the <a href="http://lists.perl.org/list/cpan-testers-discuss.html">cpan-testers-discuss mailing list</a> where many of the key members of the project can offer help and advice.</p><p>You can find out more about CPAN Testers at two forthcoming conferences. David Golden will be presenting <a href="http://www.oscon.com/oscon2010/public/schedule/detail/13759">"Free QA! What FOSS can Learn from CPAN Testers"</a> at OSCON and Barbie will be presenting <a href="http://conferences.yapceurope.org/ye2010/talk/2891">"CPAN Testers 2.0 : I love it when a plan comes together"</a> at YAPC::Europe.</p><p>CPAN Testers is sponsored by Birmingham Perl Mongers, and supported by the Perl community.</p><p>You can now <a href="http://blog.cpantesters.org/press-release-ct20-20100705.pdf">download the full and complete Press Release</a> from the CPAN Testers Blog. If you have access to further IT news reporting services, please feel free to submit the Press Release to them. Please let us know if you are successful it getting it published.</p><p>Cross-posted from the <a href="http://blog.cpantesters.org/diary/83">CPAN Testers Blog</a> </p>barbie2010-07-05T09:50:22+00:00journalJVM's -XX:-DontCompileHugeMethods & dynamic languages
http://use.perl.org/~jjore/journal/40367?from=rss
<p>In <a href="http://nerds-central.blogspot.com/2009/09/tuning-jvm-for-unusual-uses-have-some.html">http://nerds-central.blogspot.com/2009/09/tuning-jvm-for-unusual-uses-have-some<nobr>.<wbr></nobr> html</a> which I just picked out of reddit.com's front page I notice there's an ordinary 8K bytecode size limit for JVM heuristics.</p><p>Allegedly adding -XX:-DontCompileHugeMethods to the command line eliminates this limit.</p><p>In "current" versions of JVM which don't have the very new invokedynamic bytecode operation and languages implemented on top of the JVM like JRuby, I assume their implementation does all the dynamism as ordinary code. I assume then this means the bytecode sizes are artificially inflated and then possibly just missing out on this nice optimization.</p><p>Allegedly, this is one of those heuristics that moved Java from the "slow" category to "faster than C++".</p><p>Last year I found that MRI Ruby-1.9 and JRuby were equivalently fast as Perl 5 but now I wonder if the JRuby implementation I was using was missing out and possibly could go even *faster*.</p><p>FWIW, MRI Ruby-1.8 is 1/10 the speed of Perl 5.</p>jjore2010-05-26T22:02:34+00:00journalBirmingham.pm Technical Meeting - Wednesday 26th May 2010
http://use.perl.org/~barbie/journal/40364?from=rss
<code>
Event: Birmingham.pm Technical Meeting<br>
Date: Wednesday 26th May 2010<br>
Times: from 7pm onwards (see below)<br>
Venue: The Victoria, 48 John Bright Street, Birmingham, B1 1BN.<br>
Details: <a href="http://birmingham.pm.org/tech/next">http://birmingham.pm.org/tech/next</a> <br>
</code>
<p> <b>Talks:</b> </p><ul>
<li>Accelerated web development with Catalyst [Richard Wallman]</li><li>CPAN Testers 2.0 - "I love it when a plan comes together" [Barbie]</li></ul><p> <b>Details</b> </p><p>This month we welcome a returning guest speaker, Richard Wallman, who will be taking a look at how Catalyst has eased the development lifcycle of websites, from his own experiences. In addition I'll be looking at the progress of the CPAN Testers 2.0, and looking at some of the near future plans for CPAN Testers.</p><p>As per usual, this month's technical meeting will be upstairs at The Victoria. The pub is on the corner of John Bright Street and Beak Street, between the old entrance to the Alexandra Theatre and the backstage entrance. If in doubt, the main entrance to the Theatre is on the inner ring road, near the Pagoda roundabout. The pub is on the road immediately behind the main entrance. See the map link on the website if you're stuck.</p><p>As always entry is free, with no knowledge of Perl required. We'd be delighted to have you along, so feel free to invite family, friends and colleagues<nobr> <wbr></nobr>;)</p><p>Some of us should be at the venue from about 7.00pm, usually in the backroom downstairs. Order food as you get there, and we'll aim to begin talks at about 8pm. I expect talks to finish by 9.30pm, with plenty of time for discussion in the bar downstairs.</p><p> <b>Venue & Directions:</b> </p><p>
The Victoria, 48 John Bright Street, Birmingham, B1 1BN<br>
- <a href="http://www.pubs247.co.uk/pubPages/pub.asp?id=24358&from=&promotion=">Pub Details</a> <br>
- <a href="http://birmingham.pm.org/images/upload/victoria.jpg">Picture</a> <br>
- <a href="http://www.google.co.uk/maps?hl=en&client=firefox-a&q=the+victoria+pub&near=Birmingham&radius=0.0&cd=1&cid=52482921,-1893619,7492755984503563963&li=lmd&z=14&t=m">Google Map</a></p><p>The venue is approximately 5-10 minutes walk from New Street station, and about the same from the city centre. On street car parking is available see full details and directions on the <a href="http://birmingham.pm.org/tech/next">website</a>.</p><p> <b>Times:</b> </p><p>These are the rough times for the evening:</p><ul>
<li>food available until 9.00pm</li><li>talks: 8.00-10.00pm</li><li>pub closes: 11.00pm</li></ul><p>Please note that beer will be consumed during all the above sessions<nobr> <wbr></nobr>;)</p>barbie2010-05-24T19:26:06+00:00journalStop the debugger when a test fails
http://use.perl.org/~jjore/journal/40350?from=rss
<p>I was debugging some test failures earlier this morning but they were in the middle of a long test script. I thought it'd be nice if I could step through the test with the debugger and just stop whenever a test failed.</p><p>Here's the result. A test failure immediately followed by being in the debugger:</p><blockquote><div><p> <tt>not ok 236<br>14: return $result;<br> DB<1></tt></p></div> </blockquote><p>and then I could ask for the stack trace which is nice:</p><blockquote><div><p> <tt> DB<1> T<br>. = main::ok(undef) called from file `t/02_methods.t' line 796<br>. = main::check_tar_extract(ref(Archive::Tar), ref(ARRAY)) called from file `t/02_methods.t' line 507</tt></p></div> </blockquote><p>I wrote the below snippet to automatically stop the debugger whenever something like ok() failed. Currently you can just drop this right after your "use Test::More" statement. I think possibly this kind of idea should be packaged in a no-muss CPAN module or perhaps directly right into Test::More.</p><blockquote><div><p> <tt># Wrap Test::More functions with debugger breakpoints<br>BEGIN {<br> use B;<br>
<br> # Enumerate over all symbols in the main:: symbol table.<br> SYMBOL:<br> for my $symbol ( sort keys %main:: ) {<br>
<br> # Choose only things that are functions.<br> {<br> no strict 'refs';<br> next SYMBOL if ! defined &$symbol;<br> }<br>
<br> # Get a reference to the function.<br> my $code = do {<br> no strict 'refs';<br> \&$symbol;<br> };<br>
<br> # Get a B::CV object so I can get at meta-data about the<br> # function.<br> my $cv = B::svref_2object( $code );<br>
<br> # Get the path to the compilation file. Will often be a path like<br> # '/usr/share/perl/5.10/Test/More.pm'.<br> #<br> # To visually inspect other meta-data possibly available about this function:<br> #<br> # use Devel::Peek;<br> # Dump( $code );<br> #<br> my $src_file = $cv->FILE;<br>
<br> # Select only functions coming from files named like<br> #<nobr> <wbr></nobr>.../Test/More.pm.<br> next SYMBOL if $src_file !~ m{/Test/More\.pm$};<br>
<br> # Propagate the old function's prototype to the new function.<br> my $prototype = prototype $code;<br> my $new_prototype =<br> defined $prototype<br> ? "($prototype)"<br> : '';<br>
<br> # Generate the new function and replace the old function. The new function<br> # has access to the original via the closed-over $old variable.<br> my $src = qq{<br> no warnings 'redefine';<br> sub $symbol $new_prototype {<br>
<br> # Call the original function and get the test pass/fail.<br> my \$result = \$code->( \@_ );<br>
<br> # Debugger single-stepping mode if the test failed.<br> if ( ! \$result ) {<br> \$DB::single = 1;<br> }<br>
<br> # Return the test/failure.<br> return \$result;<br> }<br>
<br> # Compilation of the new function succeeded?<br> 1;<br> };<br> eval $src<br> or die $@;<br> }<br>}</tt></p></div> </blockquote>jjore2010-05-09T17:43:40+00:00journalBob Jacobsen interview on FLOSS Weekly
http://use.perl.org/~merlyn/journal/40324?from=rss
Last week, I interviewed Bob Jacobsen for FLOSS Weekly. Bob used Perl's Artistic 1.0 license on some Java code to manage model trains. The code was later patented by an Oregon-based company(!) and then Bob got sued(!!) for Bob distributing the other company's patented code(!!!). The good part of the story is that this is the first test at the US Federal Appeals Court level for an open source license to be enforceable even if no money exchanges hands, and... we won!
<p>
Bob spent a lot of time and money on the case though. Listen to <a href="http://twit.tv/floss117">the podcast</a> and contribute to <a href="http://jmri.sourceforge.net/donations.shtml">his legal defense</a> if you care about open source.</p>merlyn2010-04-23T03:55:11+00:00journalGone
http://use.perl.org/~Ovid/journal/40243?from=rss
<p>Like many others, I'm no longer posting here very much. You'll find my new technical journal at <a href="http://blogs.perl.org/users/ovid/">blogs.perl.org</a>. It's much shinier.</p><p> <a href="http://siteanalytics.compete.com/use.perl.org/">As you can see, use.perl visits have been dropping for a while</a> (blogs.perl.org is too new to show up on that search) and the <a href="http://use.perl.org/">front page of use.perl has been sadly neglected</a>. As for blogs.perl.org, after an initial rough start, <a href="http://blogs.perl.org/users/adam_kennedy/2009/12/migrating-from-useperlorg-to-blogsperlorg.html">plenty</a> <a href="http://blogs.perl.org/users/thefinalcut/2009/12/first-post-on-the-shiny-new-onion.html">of</a> <a href="http://blogs.perl.org/users/limbicregion/2009/11/goodbye-useperlorg-hello-blogsperlorg.html">people</a> are switching over and are very happy with the shiny.</p><p>I have fond memories of use.perl.org, but it's just too old and out-of-date. Come on over to our new platform and look around. Plus, <a href="http://github.com/davorg/blogs.perl.org/issues">tell us what you want changed about it</a>. (To be fair, while I was involved in the project to get it launched (mostly kibitzing and asking why things were stalled -- I'm such a marketroid<nobr> <wbr></nobr>:), the hands-on work was Dave Cross, Aaron Crane and the wonderful folks at <a href="http://www.sixapart.com/">SixApart</a>.)</p>Ovid2010-03-14T08:02:43+00:00journalHeadsup on command line for shortcuts in Windows XP
http://use.perl.org/~bart/journal/40219?from=rss
<p>For Strawberry Perl, and Padre, I use a custom entry in the Start Menu, which technically is a shortcut (*.LNK file). For example, for Padre the command line in the shortcut file was:</p><blockquote><div><p> <tt>C:\WINDOWS\system32\cmd.exe<nobr> <wbr></nobr>/c PATH=c:\strawberry\perl\bin;c:\strawberry\c\bin;%PATH% && padre</tt></p></div> </blockquote><p>Likewise, the command line for my Strawberry shell was:</p><blockquote><div><p> <tt>C:\WINDOWS\system32\cmd.exe<nobr> <wbr></nobr>/k PATH=c:\strawberry\perl\bin;c:\strawberry\c\bin;%PATH%</tt></p></div> </blockquote><p>Overnight, these both stopped working.</p><p>After a bit of puzzling, I figured out that a new program had been installed by Windows Update, and this had added a new directory to PATH. As a result, after the environment variable was substituted with its real value, the length of the expanded command line was now longer than 256 bytes, and now PATH got truncated.</p><p>Remember, folks:</p><blockquote><div><p> <b>The length of the command line for a shortcut, after expansion, should never be longer than 256 bytes.</b></p></div> </blockquote><p>If you put the code for modification of PATH in a *.BAT file, no such restriction applies.</p><p>So now, my shortcut to start the command shell is:</p><blockquote><div><p> <tt>C:\WINDOWS\system32\cmd.exe<nobr> <wbr></nobr>/k c:\strawberry\strawberry_path.bat</tt></p></div> </blockquote><p>where c:\strawberry\strawberry_path.bat contains the lines</p><blockquote><div><p> <tt>@echo off<br>PATH=C:\strawberry\c\bin;C:\strawberry\perl\bin;%PATH%</tt></p></div> </blockquote><p>which makes it easier for me to add more Perl based tools that depend on these entries in PATH: I now have a central location for the definition, if I ever need to add or modify a directory.</p>bart2010-03-02T14:26:35+00:00journaldumping environment etc from batch perl script
http://use.perl.org/~n1vux/journal/40205?from=rss
<blockquote><div><p> <tt>use Data::Dumper;<br>print Dumper([ # like<nobr> <wbr></nobr>...<br> { X=>$^X}, # which perl<br> # but not fooled by #!<br> {V0 => "$]", # perl -v , ditto<br> V => $^V lt v5.9.0<br> ? q(v).(join(q(.),<br> (map {ord}<br> split(//,$^V))))<br> : "$^V"}<nobr> <wbr></nobr>,<br> { ENV => \%ENV} , # like env<br> # but in actual context<br> { INC =>\%INC} , # incomparable<br> ]);</tt></p></div> </blockquote><p>The ugly version of V for Version is to handle 5.6-5.9 v strings and 5.10+ version objects
without knowing which, if you don't want <code>$]</code> to mess up your syntax highlighting and don't want <code>\005 </code> to trip a terminal echoback string when it vString doesn't print.</p>n1vux2010-02-24T05:37:29+00:00journalTest::Class::Most
http://use.perl.org/~Ovid/journal/40148?from=rss
<a href="http://blogs.perl.org/users/ovid/2010/01/-package-sometestclass.html">Test::Class::Most</a>.Ovid2010-01-31T19:25:10+00:00journalTesting with PostgreSQL
http://use.perl.org/~Ovid/journal/40145?from=rss
<p>My new personal project has a PostgreSQL database. <a href="http://blogs.perl.org/users/ovid/2010/01/testing-postgresql.html">Here's how I'm handling testing</a>.</p>Ovid2010-01-30T16:22:57+00:00journalah, dreams...
http://use.perl.org/~Matts/journal/40130?from=rss
<p>I just woke from a dream where it was rjbs' birthday and we got him an onion cake. Only the person who made the cake misunderstood, and instead of a cake shaped like an onion he cooked it WITH onions in it.</p><p>Bizarro.</p>Matts2010-01-26T10:31:17+00:00journalTime::Piece test failures on Win32
http://use.perl.org/~Matts/journal/40129?from=rss
<p>Can someone with Time::Piece test failures on Win32 please contact me offlist? I have a proposed patch I'd like to test, but no Win32 perl to test it on.</p>Matts2010-01-25T23:23:53+00:00journalRoles without Moose?
http://use.perl.org/~Ovid/journal/40127?from=rss
<p> <a href="http://blogs.perl.org/users/ovid/2010/01/roles-without-moose.html">Milliseconds are important</a>.</p>Ovid2010-01-25T14:04:31+00:00journalUnless what?
http://use.perl.org/~Ovid/journal/40103?from=rss
<p> <a href="http://blogs.perl.org/users/ovid/2010/01/unless-what.html">Unless what?</a> </p>Ovid2010-01-15T11:47:53+00:00journalDear Recruiters
http://use.perl.org/~Ovid/journal/40100?from=rss
<p> <a href="http://blogs.perl.org/users/ovid/2010/01/dear-recruiters.html">Dear Recruiters</a> </p>Ovid2010-01-13T13:06:11+00:00journalNext QA Hackathon -- What Do You Need?
http://use.perl.org/~Ovid/journal/40093?from=rss
<p> <a href="http://blogs.perl.org/users/ovid/2010/01/next-qa-hackathon----what-do-you-need.html">Read about the next QA Hackathon</a>.</p>Ovid2010-01-12T11:37:14+00:00journalAttaching to a process and calling a kernel function
http://use.perl.org/~jjore/journal/40088?from=rss
<p>I figured out last night that I could use allocate memory within another process for the purposes of using more complicated APIs. In the below example, I attached to one of my shells and queried the groups out of it.</p><p>In this snippet, the target shell tells me its process id is 40728.</p><blockquote><div><p> <tt>Last login: Fri Jan 8 16:51:00 on ttys000<br>w3m211a:~ jjore$ echo $$<br>40728</tt></p></div> </blockquote><p>I'm calling the (int)getgroups( int, int* ) kernel function. I start by getting the size of an integer because I'm going to allocate some multiple of this.</p><blockquote><div><p> <tt>w3m211a:~ jjore$ gdb -p 40728<br>
<br>(gdb) print sizeof(int)<br>$1 = 4</tt></p></div> </blockquote><p>Call (int)getgroups(int,int*) once to get the number of groups I'm a member of.</p><blockquote><div><p> <tt>(gdb) print (int)getgroups(0,0)<br>$2 = 16</tt></p></div> </blockquote><p>Allocate 64 bytes of memory to hold my groups[16] array.</p><blockquote><div><p> <tt>(gdb) print (void*)malloc(64)<br>$3 = (void *) 0x10010fca0</tt></p></div> </blockquote><p>Call (int)getgroups(int,int*) again but this time the kernel will write to my memory with the group ids.</p><blockquote><div><p> <tt>(gdb) print (int)getgroups($2,$3)<br>$4 = 16</tt></p></div> </blockquote><p>Print the 16 decimal numbers out of memory</p><blockquote><div><p> <tt>(gdb) x/16d $3<br>0x10010fca0: 2042662593 401 1612991420 1178352327<br>0x10010fcb0: 102 800006232 204 100<br>0x10010fcc0: 98 81 80 79<br>0x10010fcd0: 62 12 155049148 2133303823</tt></p></div> </blockquote><p>Clean up</p><blockquote><div><p> <tt>(gdb) print (void)free($3)<br>$5 = void</tt></p></div> </blockquote>jjore2010-01-09T01:30:33+00:00journalMost Popular Testing Modules - January 2010
http://use.perl.org/~Ovid/journal/40086?from=rss
<p> <a href="http://blogs.perl.org/users/ovid/2010/01/most-popular-testing-modules---january-2010.html">Most popular testing modules as of January 2010</a> </p>Ovid2010-01-07T21:46:46+00:00journalCPAN Testers Summary - December 2009 - The Wall
http://use.perl.org/~barbie/journal/40083?from=rss
<p>Cross-posted from the <a href="http://blog.cpantesters.org/diary/64">CPAN Testers Blog</a>.</p><p>Last month CPAN Testers was finally <a href="http://blog.cpantesters.org/diary/61">given a deadline</a> to complete the move away from SMTP to HTTP submissions for reports. Or perhaps more accurately to move away from the perl.org servers, as the amount of report submissions has been affecting support of other services to the Perl eco-system. The deadline is <b>1st March 2010</b>, which leaves just under 2 months for us to move to the CPAN Testers 2.0 infrastructure. Not very long.</p><p> <b>David Golden</b> has now put together a <a href="http://www.dagolden.com/index.php/614/project-plan-for-cpan-testers-2-0-migration/">plan of action</a>, which is being rapidly consumed and worked on. The first fruits of which has been an update to the <a href="http://www.cpantesters.org/">CPAN Testers Reports</a> site. The ID previously visible on the site, refering to a specific report, is now being hidden away. The reason for this is that the current ID refers to the NNTP ID that is used on the perl.org NNTP archive for the <i>cpan-testers</i> mailing list. This ID is specific to the SMTP submissions and includes many posts which are not valid reports. As such we will be moving to a GUID as supplied by the Metabase framework, with existing valid SMTP submitted reports being imported into the Metabase. The NNTP ID will eventually be completely replaced by the Metabase GUID across all parts of the CPAN Testers eco-system, including all the databases and websites. As such you will start to see a transition over the next few weeks.</p><p>The second change which has now been implemented, is to present the reports via the <a href="http://www.cpantesters.org/">CPAN Testers Report</a> site and not the NNTP arcive on the perl.org servers. Currently the presentation of a report (e.g. <a href="http://www.cpantesters.org/cpan/report/6524841">this report for App-Maisha</a>) is accessed via the reports pages for a distribution or an author, but will also be accessible in a similar manner across all the CPAN Testers websites. There are a large batch of early reports that are currently missing from the database, but these are being updated now, and will hopefully be complete within the next few days. If you have any issues with the way the reports are presented, including any broken or missing links from other parts of the site, please let me know.</p><p>In all this change, there is one aspect that may worry a few people, and that is the <i>"Find A Tester"</i> application. For the next few months it will still exist, but the plan is to make the Reports site more able to provide tester contact information. In addition to this the testers themselves will soon have the ability to update their own profiles. Initially this will be used to link email addresses to reports and then map those email addresses to a profile held wihtin the Metabase, but in the longer term will be used to help us manage the report submissions better.</p><p>David Golden is concentrating on the Client and Metabase parts of the action plan, and I am working on porting the websites and 'cpanstats' database. If you have any free time and would like to help out, please review the <a href="http://www.dagolden.com/index.php/614/project-plan-for-cpan-testers-2-0-migration/">action plan</a>, join the <a href="http://wiki.cpantesters.org/wiki/MailingLists"> <i>cpan-testers-discuss</i> mailing list</a>, and please let us know where you'd like to help. There is a lot of work to be done and the more people involved, the better the spread of knowledge in the longer term.</p><p>After David announced the <a href="http://www.mail-archive.com/cpan-testers-discuss@perl.org/msg01550.html">deadline last month</a>, all the testers have throttled back their smoke bots. This saw a dramatic reduction in the number of reports and page being processed, and enabled the Reports Page Builder to catchup with itself, to the point it was frequently having less than a 1000 request waiting. That changed yesterday with the changes to the website, as every page now needs to be updated. It typically takes about 5 days to build the complete site, so this quiet period will help allow the Builder to rebuild the site, without adversely affecting the currently level of report submissions. Expect the site to reach a more managable level of processing some time next week. To help monitor the progress of the builder, a new part of the Reports site, <a href="http://www.cpantesters.org/home/status">The Status Page</a>, now checks the status of all outstanding request every 15 minutes, providing a 24 hour persepctive and a week long perspective.</p><p>A new addition to the family was also launched recently, the <a href="http://analysis.cpantesters.org/">CPAN Testers Analysis</a> site, which <b>Andreas König</b> has been working on, to help authors identify failure trends from reports for their distributions. Read more on <a href="http://blogs.perl.org/users/andreas_konig/2010/01/so-you-got-mixed-results-from-cpantesters.html">Andreas' blog</a>.</p><p>Last month we had a total of 168 tester addresses submitting reports. The mappings this month included 22 total addresses mapped, of which 2 were for newly identified testers. Another low mapping month, due to work being done on CPAN Testers as a whole.</p><p>My thanks this month go to <b>David Golden</b> for finding the time to write an action plan, and <b>his wife</b> for allowing him the time to write it, as well as working on all the other areas involving the CPAN Testers and the Metabase<nobr> <wbr></nobr>:)</p>barbie2010-01-07T13:54:38+00:00journalUnicode URLs, wtf?
http://use.perl.org/~jjore/journal/40081?from=rss
<p>Hey internet, ⠸⠙⠱ ⠝⠉⠁⠈ ⠅⠝⠁⠕⠕⠉⠃ ⠝⠆⠏⠍⠞?</p><p>A year or more ago I was fixing work's web site to handle Unicode as entered by users into fields. We don't use CGI.pm because....? Well ok, we just don't. It also doesn't handle Unicode properly either. Or at least almost no version. Huh.</p><p>If a user types "Coatıcook" you'll probably get the dotless "i" character as either %C4%B1 or %u131 but CGI.pm as supplied by perl almost most of the time won't do something reasonable.</p><ul><li>not ok 5.11.3 CGI-3.48</li><li>not ok 5.10.1 CGI-3.43</li><li>ok 5.10.0 CGI-3.29</li><li>not ok 5.8.9 CGI-3.42</li><li>not ok 5.6.2 CGI-2.752</li></ul><p>Wut?</p><blockquote><div><p> <tt>for v in 5.11.3 5.10.1 5.10.0 5.8.9 5.6.2;do<br> <nobr> <wbr></nobr>/opt/perl-$v-64-thr-dbg/bin/perl\<br> -le '<br> use CGI;<br>
<br> my $input = "a=%u2021";<br> my $expect = "\x{2021}";<br> my $got = CGI->new( $input )->param( "a" );<br>
<br> print $expect eq $got<br> ? "ok $] $CGI::VERSION"<br> : "not ok $] $CGI::VERSION"<br> ';<br>done</tt></p></div> </blockquote>jjore2010-01-07T05:43:29+00:00journalDecoding multiple encoded utf-8 in perl or ruby
http://use.perl.org/~jjore/journal/40080?from=rss
<p>I'd recently encountered some data that had been re-encoded five times. Ugh. The key was to guess that if a character 0xC0-0xFF is followed by 0x80-xBF, it's likely that the bytes are actually utf-8. What follows is a function which guessed a reasonable way to deal with the data and turn it into the right utf-8.</p><blockquote><div><p> <tt>use Test::More tests => 1;<br>use Encode ();<br>
<br>my $bad = "\xc3\x83\xc2\x83\xc3\x82\xc2\x83\xc3\x83\xc2\x82\xc3\x82\xc2\x83\xc3\x83\xc2\x<nobr>8<wbr></nobr> 3\xc3\x82\xc2\x82\xc3\x83\xc2\x82\xc3\x82\xc2\xa9";<br>my $good = "\xe9";<br>is( multiple_decode( $bad ), $good );<br>
<br>sub multiple_decode {<br> my ( $str ) = @_;<br>
<br> Encode::_utf8_on( $str );<br> while ( $str =~<nobr> <wbr></nobr>/[\xc0-\xff][\x80-\xbf]/ ) {<br> utf8::downgrade( $str );<br> Encode::_utf8_on( $str );<br> }<br>
<br> return $str;<br>}</tt></p></div> </blockquote><p>I tried doing this in Ruby because I actually needed this for an EventMachine (<a href="http://rubyeventmachine.com/">http://rubyeventmachine.com/</a>) server but never quite got it working. Iconv seemed to want to be strict about rejecting the originally ostensibly invalid input.</p><blockquote><div><p> <tt># Iconv::IllegalSequence: "\303\203\302\203\303\202\302\203\303\203\302\202\303\202\302\203"...<br>
<br>require 'test/unit'<br>require 'iconv'<br>
<br>class MDecode < Test::Unit::TestCase<br> def test_multiple_decode<br> conv = Iconv.new( 'UTF-8', 'ASCII' )<br>
<br> bad = "\xc3\x83\xc2\x83\xc3\x82\xc2\x83\xc3\x83\xc2\x82\xc3\x82\xc2\x83\xc3\x83\xc2\x<nobr>8<wbr></nobr> 3\xc3\x82\xc2\x82\xc3\x83\xc2\x82\xc3\x82\xc2\xa9"<br> good = "\xe9"<br>
<br> assert_equal( good, conv.multiple_decode( bad ) )<br> end<br>end<br>
<br>class Iconv<br> def multiple_decode( str )<br> while str =~<nobr> <wbr></nobr>/[\xc0-\xff][\x80-\xbf]/<br> str = iconv( str )<br> end<br>
<br> return str<br> end<br>end</tt></p></div> </blockquote>jjore2010-01-07T03:57:25+00:00journalWarning compiling perl stuff on Snow Leopard
http://use.perl.org/~Matts/journal/40075?from=rss
<p>I've searched but can't find any reference to this...</p><p>Compiling IO::KQueue on Snow Leopard I get the following warning:</p><blockquote><div><p> <tt>KQueue.xs: In function 'XS_IO__KQueue_kevent':<br>KQueue.xs:71: warning: format not a string literal and no format arguments</tt></p></div> </blockquote><p>Yet that line is just:</p><blockquote><div><p> <tt> Newxz(ke, max_events, struct kevent);</tt></p></div> </blockquote><p>Which seems to me pretty standard perl, and no format strings involved (though Newxz expands quite a few macros).</p>Matts2010-01-04T22:13:57+00:00journalCool Things in Perl 6: Subsets
http://use.perl.org/~Ovid/journal/40072?from=rss
<p> <a href="http://blogs.perl.org/users/ovid/2010/01/cool-things-in-perl-6.html">They're going to be a lot of fun</a>.</p>Ovid2010-01-04T13:11:31+00:00journalI'm twittering my Perl stuff at http://twitter.com/briandfoy
http://use.perl.org/~brian_d_foy/journal/40068?from=rss
<p>I'll tweet at (http://twitter.com/briandfoy_perl) when I have something to say in 140 characters. I'll almost always use "Perl" when I post.</p>brian_d_foy2010-01-02T13:06:32+00:00journalEffective Perl Programming master class at Frozen Perl
http://use.perl.org/~brian_d_foy/journal/40065?from=rss
At <a href="http://www.frozen-perl.org/mpw2010/briandfoy.html">Frozen Perl 2010</a> in Minneapolis, I'm teaching a new master class based on my latest book, <a href="http://www.amazon.com/Effective-Perl-Programming-Software-Development/dp/0321496949">Effective Perl Programming, 2nd Edition</a>. Perl has changed quite a bit since Joseph Hall wrote the
first edition over 10 years ago. Josh McAdams and I have added a lot of new information as well as updated the existing material.
In the one-day class for intermediate Perl programmers, I'll cover
selected topics from the book, including:
<ul>
<li>Working with Unicode in Perl</li>
<li>Tricks with filehandles</li>
<li>New regex features in Perl 5.10 and later</li>
<li>Playing with pack()</li>
<li>Using closures to make things simpler</li>
<li>and other topics as time allows</li>
</ul><p>
Although the book hasn't been published yet, it is available for
pre-order, and attendees to the class can get a sneak peek at the
working manuscript as well as a soft copy of the course slides.</p>brian_d_foy2010-01-01T13:32:50+00:00journalPerl 6 Config::INI parser on github
http://use.perl.org/~Ovid/journal/40060?from=rss
<p> <a href="http://blogs.perl.org/users/ovid/2009/12/perl-6-configini-on-github.html">Details here</a>.</p>Ovid2009-12-30T17:48:47+00:00journalBuilding a lot of perl today...
http://use.perl.org/~jjore/journal/40057?from=rss
<blockquote><div><p> <tt>#!/bin/bash<br>
<br>set -x<br>set -e<br>perl="$HOME/src/perl"<br>
<br>function build-it () {<br> bversion=$1<br> shift 1<br>
<br> dir=/opt/$bversion<br> tar=/opt/$bversion.tar.bz2<br>
<br> if [[ ! -e $tar ]]; then<br> echo "Clobbering $dir"<br>
<br> rm -rf $dir<br> mkdir $dir<br>
<br> cd $HOME/src/perl<br> echo "Configure "$(date) > $dir/stamp.log<br> <nobr> <wbr></nobr>./Configure -des -Dcc='ccache gcc' -Dprefix=$dir $* 2>&1 | tee $dir/config.log<br> echo "make "$(date) >> $dir/stamp.log<br> make 2>&1 | tee $dir/make.log<br> echo "make test "$(date) >> $dir/stamp.log<br> make test 2>&1 | tee $dir/test.log<br> echo "make install "$(date) >> $dir/stamp.log<br> make install 2>&1 | tee $dir/install.log<br> echo "End "$(date) >> $dir/stamp.log<br> chown -R jbenjore $dir/<br>
<br> cd<nobr> <wbr></nobr>/<br> tar cjf $tar $dir<br>
<br> cd $HOME/src/perl<br> git clean -xdf<br> git reset --hard<br> fi<br>}<br>
<br>git clean -xdf<br>git reset --hard<br>
<br>for tag in\<br> v5.11.3\<br> perl-5.10.1 perl-5.10.1\<br> perl-5.8.9 perl-5.8.8 perl-5.8.7 perl-5.8.6 perl-5.8.5 perl-5.8.4 perl-5.8.3 perl-5.8.2 perl-5.8.2 perl-5.8.1 perl-5.8.0<br> do<br> git checkout $tag<br>
<br> build-it $tag-64-dbg -DDEBUGGING -Duse64bitint<br> build-it $tag-thr-dbg -DDEBUGGING -Dusethreads<br> build-it $tag-64-thr-dbg -DDEBUGGING -Duse64bitint -Dusethreads<br> build-it $tag-dbg -DDEBUGGING<br> build-it $tag -DDEBUGGING=-g<br>done<br>
<br>for tag in\<br> perl-5.6.2 perl-5.005_04<br> do<br> git checkout $tag<br>
<br> build-it $tag-64-dbg -DDEBUGGING -Duse64bitint<br> build-it $tag-thr-dbg -DDEBUGGING -Dusethreads<br> build-it $tag-64-thr-dbg -DDEBUGGING -Duse64bitint -Dusethreads<br> build-it $tag-dbg -DDEBUGGING<br> build-it $tag -g<br>done</tt></p></div> </blockquote>jjore2009-12-29T21:49:08+00:00journal