Wednesday, March 24, 2010

Perl, JSON, and PerlApp Problems

I have a script that runs PerlApp against perl files. I just added the JSON module to my function and so I installed JSON on the machine that runs PerlApp. The problem comes when I try to run the .exe script that uses JSON - the script dies saying that it can't find PP.pm. This is because JSON.pm uses PP.pm but does not directly have a "use PP.pm" so PerlApp doesn't know to include it in the function's .exe.

In order to solve this problem we could directly include PP.pm in the PerlApp include (keep in mind I'm running PerlApp from a command line to automate the build process). The other option is to directly include PP.pm in the perl function that is already include JSON.

Subversion Merge

So you want to merge a subversion branch into the trunk. I tried to use TortoiseSVN but the subversion version on the server must be at least 1.5. Unfortunately I have 1.4 on the server and no access to update this. In order to merge via SVN command line, you can do the following:

1. Check out the trunk if you don't already have it. CD into the trunk.
2. Run:
svn merge https://subversion.branch.repository.url -r firstBranchRevision:lastBranchRevision .

When the branch is created, the firstRevision will be the last revision from the trunk (i.e., it's not going to be revision 1). The command figures out what changed in the branch and then merges those changes with your current working directory (.).

If there are any conflicts, you could resolve them with the command line tool, or, if you're like me, you can use TortoiseSVN to visually edit the conflicts.