Net::Google::Calendarでハマったこと
perlでNet::Google::Calendarを使うとき
401 Authorization required
と言われるのは
Cypt::SSLeayがないから
http://perl.g.hatena.ne.jp/ishiduca/20100504/1272948725
んで
Crypt::SSLeayのテスト01-connect.tがこけるのは
# Failed test 'Net::SSL->new' # at t/01-connect.t line
LANGがCじゃないから
http://smokycat.info/perl/240
それでもまだ401が返るので
http://www.cd.info.hiroshima-cu.ac.jp/~ichihara/wordpress/2009/07/29/netgooglecalendar/
にあるように
print $@;
すると
LWP will support https URLs if the LWP::Protocol::https module is installed.
っていわれるのでそれもインストール
あとcronで動かすときはPATHやhttp_proxyをわすれるな
PATH=/home/.../perl5/perlbrew/perls/perl-5.16.0/bin:/home/.../script:/usr/local/bin:/usr/bin:/bin http_proxy=http://proxy.example.net:8080 LANG=C 0 9 * * * get_gcal.pl
疲れるorz