Module::Setup + GitHub flavor

CPANにモジュールをあげなくても,普段からCPANのレイアウトで書くのはよい習慣だと思います.というわけでひな形を作るModule::Setupをインストール.モジュール作者のYappoさんの記事(Module::Setup でらくらくモジュール作成 - JPerl Advent Calendar 2009)があるので見ながらインストール

$ cpanm Module::Setup
$ module-setup --init
$ module-setup --init --flavor-class=GitHub github

module-setup --init --flavor-class=FlavorClass flavornameみたいな指定で,flavorが追加される

GitHubのflavor設定で出てきたモジュールもインストールしておいた

$ cpanm Module::Install Module::Install::ReadmePodFromPod Module::Install::GithubMeta Module::Install::ReadmeMarkdownFromPod Module::Install::ReadmeFromPod

何もするつもり無いけど,前書いたPlack::Middleware::GoogleAnalyticsで作ってみる

$ module-setup Plack::Middleware::GoogleAnalytics
set the github.token And github.user for git config if you wants the create github repository.

などといわれたので設定する.http://help.github.com/git-email-settings/ を参照…ではなく,https://github.com/accountでGlobal git config informationをクリックするとコマンドが出るよ

$ git config --global github.user lapis25
$ git config --global github.token 0123456789abcdef0123456789abcdef

そして再実行

create private repository? [yN]  [n] 
can not created on GitHub

途中までうまくいってるんだが,実際にrepository作ってるところで失敗してる.なので,検証用のコード書いてLWPのメッセージを見てみたら

LWP will support https URLs if either Crypt::SSLeay or IO::Socket::SSL
is installed. More information at
<http://search.cpan.org/dist/libwww-perl/README.SSL>.

要するにSSL用のモジュールが足りない,と.入れて

$ cpanm Crypt::SSLeay

んでふたたび再実行.お,成功した(http://github.com/lapis25

とりあえずこれで,Module::Setup使ってGitHub上でモジュール作り始められるようになりましたとさ

#05