Lession of the day: Don't always do what the customer wants

Today I got a call from an client who wanted a new feature - that was not completely done yet - deployed ASAP, so that they can mention it in their weekly newsletter. Instead of doing the sensible thing (i.e. tell them to wait until I'm home and have access to the proper staging setup (i.e. my laptop...)) I did the stupid thing and finished the implementation in a hurry.

And then I did the even stupider thing, namely "deploying" the code ("deploying" means uploading the changed files via ftp and then touching a certain file to trigger a server restart. hrmpf). Of course, the server did not came up again, and I had to cycle home in a hurry, to fix things properly. (In the meantime the sysadmins removed the broken code and got the site back up. Uff...)

In the end the reason was this:

$digest //= $c->req->captures->[0];

...

$content_type = 'application/pdf';

Looks perfectly ok. And it is perfectly ok, as long as you're running 5.10. Which is what I use for nearly all of my projects. Except for this one (which in fact was only moved to 5.8 two years ago).

Oh, and it took me a while to figure out that error message: "Bad name after pdf' at bla"

Conclusion: Do not rush deploys, even if the customer wants you to. And remember what Perl you're actually using...

Original: http://use.perl.org/~domm/journal/38858

Legacy comments

dagolden: Time for Test::MinimumVersion? (orignal post)

Maybe add Test::MinimumVersion [cpan.org] to your pre-deployment testing...

-- dagolden

Aristotle: Re: (orignal post)

How will that help code that gets deployed without testing? :-)