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...
Maybe add Test::MinimumVersion to your pre-deployment testing...
-- dagolden
Re:Time for Test::MinimumVersion?
Aristotle on 2009-04-27T14:52:09
How will that help code that gets deployed without testing?
:-)