PGP Signed Comments
As an intellectual exercise, more than for any practical reason, I implemented OpenPGP Signing of Movable Type Comments on my weblog. As Krishnan Nair Srijith, the author of the Movable Type plugin, points out, "installing Crypt::OpenPGP's prerequisites is no easy work :)" So much so, that if I had know how much work it would be, I might not have attempted it. Nevertheless, I am glad that I did, if only because I learned a little bit about Perl in the process, perhaps enough to pique my curiosity to learn more.
My experience installing the prerequisite local Perl modules for Crypt::OpenPGP in my home directory can be summed up as follows:
Create the following directories in your home directory:
mkdir usr
mkdir usr/local
Set the environment variable (my shell is "/bin/bash")
export PERL5LIB="/home_directory/usr/local/lib/perl/5.6.1:\
/path_to_home_directory/usr/local/share/perl/5.6.1:" You may eventually want to add this line to your .bash_profile so that it will set the variables every time you log in.
You can see if you have properly set the environment variables by typing the command
perl -V
(Note that the flag is a capital "V"). Your library path (path_to_home_directory/usr/local/lib/perl/5.6.1) should be listed under @INC.
Download the required modules from http://www.cpan.org. The README in Crypt:OpenPGP lists the prerequisite modules, although some of these may also have prerequisites on your system.
Unpack the module with:
tar -xvzf module_name.tar.gz
cd module_directory
perl Makefile.PL PREFIX=/path_to_home_directory/usr
make test
make
make install
Repeat until all the modules are installed without errors, and finally install Crypt::OpenPGP. You then need to edit your Movable Type templates to take advantage of the new plugin. Be sure that you have put an ASCII copy of your PGP Public Key (e.g. http://www.williamsonday.com/pgp.asc on your site so that you can test the key verification feature of the plugin.
I found that once I had properly set the environment variable (which took me some time to get right), most of compilation errors that I experienced resulted from my having not yet installed a prerequisite to the prerequisite module.
NOTE: Although installing the local modules manually rather that automatically through CPAN was somewhat tedious and time-consuming, I found that it was the only way that I was able to make the local installation work properly.
Also, Srijith suggests that it may be a good idea to edit OpenPGPComment.pl to set the variable called DEBUG to 0.
Categories
Computers1 Comments
Leave a comment
The views expressed on this website are those of the author and webmaster alone (with the exception of links to or quotations from other sources), and do not represent the views of his employer, family, friends, associates or any other person. The author expressly disclaims responsibility for any material to which this site links, any site which links to this site, and any contributions by other persons — including but not limited to links, comments or trackbacks. No statement on this website should be regarded or relied upon as legal or business advice of any kind. Persons seeking legal advice should consult a lawyer licensed in the relevant jurisdiction. This site does not create an attorney-client relationship, nor does reading it, contributing to it, or commenting upon it.

When I was upgrading OpenPGPComment, I realized that in order for it to recognize my local perl installation, I had to add lines to the top of my script as follows:
Installing mod_perl without superuser privileges