Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Monday April 13, 2009
04:54 PM

backticks make my Windows testing service hang on ack

I've run into an interesting situation in testing CPAN modules on Windows using TeamCity. Testing from the command line, either cygwin or command, works fine, but when the automated tester has a go, it fails. I traced this back to modules that use system() or backticks. The ack distribution has been the one to demonstrate the problem first. I wonder if anyone else has seen a similar problem.

I've been working on a custom internal CPAN for a big company, and their CPAN is actually in subversion. When the subversion repo changes, lots of tests kick off, including tests for individual modules as well as integration tests. These tests run on both unix and Windows using the TeamCity build agents. Some of the Windows tests just hang forever, although they run fine on my workstation.

It appears that the Windows build agents are run as a Windows service, so it's not connected to something that can handle system calls. I don't understand the Windows set-up and architecture enough to say more than that. Once the build agent hits a line of code that wants to shell out somehow, it hangs forever. It only does this in the build agent.

I was working with ack, which has a t/Util.pm for things that most of the tests use. There is a run_ack_with_stderr() subroutine which uses backticks, and that's where the code hangs. Once it runs t/ack-1.t, everything stops.

Paul's IPC::System::Simple::capture() works as a backticks replacement and has already solved many problems we've had with Windows. However, my first try in replacing backticks made all sorts of other tests fail even though it could run the commands now. Nothing hung, but there was something I wasn't capturing correctly or putting in the right place, I figure. I eventually had to cut bait since I'm not getting paid to work on third-party modules.

I'm curious how this works for the Windows CPAN testers. Are you just running the testing script from a command or terminal window? Do you ignore distros that just hang? I didn't see any sort of ack failure that showed the same symptoms.

And, is there some sort of medal or award that Paul can get for IPC::System::Simple? I wasn't keen on depending on it at first, but now that I've experienced a bit of grief trying to make Windows be unix, I really appreciate IPC::System::Simple taking care of all of that.

Saturday April 04, 2009
06:57 PM

Get 15% off OSCON

Register for OSCON with the discount code os09pgm and get 15% off, courtesy of the Perl track committee.

Friday April 03, 2009
09:03 PM

I'm going to Moscow for YAPC::Russia

I get to go to YAPC::Russia because United Airlines has ridiculously cheap airfares to Moscow to celebrate their new direct service from Washington, DC. Even better than that, the frequent flier deals get me to Moscow for the price of a domestic ticket.. The conference is May 16-17, but I'll be there the week before too.

I just got my Lonely Planet Moscow City Guide, so now I have to start planning my trip.

Sunday March 08, 2009
05:10 AM

2008 jobs.perl.org report

Here are the numbers for the number of job advertisements posted to jobs.perl.org in 2008, by month.

I'm not affiliated with jobs.perl.org, and this is only the simplest of analyses. I didn't try to correct for duplicate posts where the same job was re-advertised. I don't attempt to draw any conclusions about the popularity (up or down) of Perl from these numbers. In general, I think that the continual uptrend through 2006 is about more people discovering the service, and the dismal numbers in 2008 mostly reflect the current economic cycle more than anything to do with technology.

-------------------------------------------------------------------------------- ----------
Year | Total |   Jan   Feb   Mar   Apr   May   Jun   Jul   Aug   Sep   Oct   Nov   Dec
-------------------------------------------------------------------------- ----------------
2001 |   280 |     0     2     8    21    40    34    33    29    34    30    35    14
2002 |   413 |    34    33    35    16    45    26    37    46    33    42    31    35
2003 |   560 |    43    36    56    56    21    39    44    64    53    52    52    44
2004 |   949 |    75    58    78    88    74    88    82    87    65    87    85    82
2005 |  1429 |    93   110   120   135   135   125   115   113   106   132   144   101
2006 |  1857 |   164   138   157   151   166   153   140   176   152   172   179   109
2007 |  1966 |   182   156   181   190   177   168   176   165   145   179   148    99
2008 |  1451 |   156   140   152   158   156   158   136   110    85    87    71    42
---------------------------------------------------------------------------- --------------

Also see the threads for the 2006 and 2007 jobs.perl.org reports for past discussions.. Some other resources include:

Wednesday February 18, 2009
03:59 PM

Is there a module that lobotomizes subroutines?

Is there already a module that will turn a list of subroutines into no-ops? I'm doing this to disable features in production code, not testing, and only because other work-arounds are intractable. It's monkeypatching to give a class a lobotomy.

I know about Curtis's Sub::Override, so I might just write a wrapper around that for an interface that looks something like:

use Sub::Nerf;
 
nerf( $return_value, @list_of_subs );  # all subs just return $return_value
 
unnerf( @list_of_subs ); # back to where we started

Monday January 12, 2009
04:48 PM

YAPC::EU 2009 has a LinkedIn Group

José tells me that YAPC::EU 2009 has a LinkedIn group. You can note that you are attending, presenting, and so on, and get more bling for your profile. You can also see who else is coming.

Friday November 07, 2008
10:28 PM

New ActiveState PPM build system is live

ActiveState tells me that the new PPM servers are now available. This is the new hotness that Jan Dubious talked about at the beginning of the year.
You need the PPM 4 client, which is already in the 5.10 distros and the 5.8 distros since build.

The new repos have many more modules. These numbers are straight from ActiveState today:

Platform Vers | Old Repo | New Repo (CPANfly)
 
  Linux   5.8      7790     10961
  Linux   5.10     5611     10888
 
  OS X    5.8      8506     10907
  OS X    5.10     2662     10878
 
  Windows 5.8      7267      9106
  Windows 5.10     6524      9060

Tuesday October 14, 2008
03:33 PM

Use git to easily make third party module patches

In the olden days, to make a patch to a module, you had to have the original, untouched file and a copy that you modified. You'd then use diff to compare the two files.

At the Pittsburgh Perl Workshop, Ricardo was asking how to do some odd thing in git. Instead of anyone answering his question, everyone asked what he was doing. It turns out he was patching someone's module and making it a git repo while he worked. The process is really handy:

  1. Download module distribution and unpack it
  2. Make it a git archive with git init
  3. Add the initial content to the index with git add .
  4. Commit the initial content with git commit -m "* Version 1.23 from CPAN"
  5. work, work, work
  6. Generate your patch with git format-patch --stdout -1
  7. And Bob's your uncle

There are other ways that you can do this, and you can change around the process in git. I like that git is lightweight enough to make it actually useful for everyday work.

Monday September 29, 2008
08:49 PM

Simon Phipps on open source, on FLOSS

For FLOSS Weekly 39, Leo Laporte and Randal interviewed Simon Phipps, the Chief Open Source Officer at Sun. It's not the normal open source religion, and a much better view than I've heard for the "Open Source" people.

The entire hour long interview is excellent, but this was my favorite part:

Simon Phipps (@0:14:08): What characterizes open source is, open source is the syncronization of the self interest of many parties. And to create an environment where people are willing to synchronize their self interest and collaborate over code, there has to be transparency. On the other hand, in open source, you know, Randal, I don't care what your motivations are for being involved in Perl. They're of no relevance to my life because our relationship around Perl depends on code and the code and the community are transparent, but your motivations for participating in it are opaque. It's up to me. They're private to me.

Leo Laporte: They're also irrelevant because of transparency, the codes speaks for itself.

Simon: Absolutely. So I'm able to maintain my privacy around my motivations and degree of my involvement and how I'm funding it. I maintain responsibility for that part that is private as well. On the other hand, I'm able to work in an environment of transparency where all the code is known, all its origins are known, all its defects are potentially known, and that combination of transparency with privacy is, in my opinion, what characterizes open source. Trying to define open source in terms of licenses in kinda outmoded in my view. Open source is about transparency at the community level but also about privacy in terms of my motivations.

Simon also said quoted:

Whenever you create a system, you create the game that plays it.

Does anyone know the source of that quote?

Saturday September 27, 2008
04:39 PM

Devel::Alphabet::Cover

Looking at my module namespaces, I see that I've uploaded in 13 different beginning letters. Now I need to get the other 13.

I need to figure out how to make modules beginning with E, G, I, J, K, Q, R, U, V, W, X, Y, Z. The end of the alphabet is feeling a bit neglected.

G is for Geo::, so that's just something I need to finish and upload.

For U, I've been thinking about writing some sort of USB Thumb drive file read/write speed tester. Too bad that belongs in something like Device::*

For X, I guess I'll have to make something in the XML namespace.

Y, huh, maybe something in YAML.

I haven't thought too much about the other letters.