Archive for the ‘programming’ Category

IPC::System::Simple

Wednesday, March 18th, 2009

IPC::System::Simple – Run commands simply, with detailed diagnostics

use IPC::System::Simple qw(system systemx capture capturex);

system("some_command");        # Command succeeds or dies!

system("some_command",@args);  # Succeeds or dies, avoids shell if @args

systemx("some_command",@args); # Succeeds or dies, NEVER uses the shell

# Capture the output of a command (just like backticks). Dies on error.
my $output = capture("some_command");

# Just like backticks in list context.  Dies on error.
my @output = capture("some_command");

# As above, but avoids the shell if @args is non-empty
my $output = capture("some_command", @args);

# As above, but NEVER invokes the shell.
my $output = capturex("some_command", @args);
my @output = capturex("some_command", @args);

Awesome! I’ve been doing things similar to capturex() for years, but this is just so much better.

There are times when I hate you PJF!

Neural Core Dump » Blog Archive » set_bugs = 0;

Monday, February 16th, 2009

Neural Core Dump » Blog Archive » set_bugs = 0;.

Now if only that would work on my code…

OSDC 2008

Wednesday, October 29th, 2008

OSDC 2008: Sydney

Constraints and Software Development – O’Reilly ONLamp Blog

Tuesday, October 2nd, 2007

Constraints and Software Development – O’Reilly ONLamp Blog

“Constraints are Good”

Michael Feathers’ Blog: The Deep Synergy Between Testability and Good Design

Thursday, September 27th, 2007

Michael Feathers’ Blog: The Deep Synergy Between Testability and Good Design

When I write tests and I have the urge to test a private method, I take
it as a hint… I listen to the hint, and factor my design differently.

Waterfall 2006 – International Conference on Sequential Development

Thursday, March 9th, 2006

Waterfall 2006 – International Conference on Sequential Development