CPAN

cpan

CPANとは

Perl のモジュール・ライブラリを集めた巨大アーカイブ

StrawberryPerl(Windows)でCPAN利用

cpan install ****

CPANを再設定する

サーバは 5.riken~ を選ぶといい

cpan> o conf init

ActivePerl(Windows)でCPAN利用

コマンドプロンプトで
ppm
コマンド実行するだけで次のようなウィンドウが開きGUIでインストールできる。

標準ライブラリや、CPANに登録されている汎用性の高いモジュールを利用することによって「車輪の再発明」を防ぐ。 シンプルなコードになり、開発の速度向上や、バグの防止に繋がる。

CPANモジュールのインストール

linuxのroot権限にて以下のコマンドを実行。

# perl -MCPAN -e shell
http://y-kit.jp/saba/xp/cpan.htm

コマンドライン:CPANを使ってモジュールをインストール

cpan

cpan> install JSON
cpan> install JSON::Any
cpan> install XML::RSS
.
.
.

これだけ。 たまに[y/n]の質問されるのでEnterで。

CPANの再設定

cpan> o conf init

使い方はコードの頭にuse ****** という形で宣言するだけ。

#!/usr/bin/perl

use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use HTML::Template;


CPANモジュールのアップデート

古いモジュールを一覧表示する

# perl -MCPAN -e 'CPAN::Shell->r'

古いモジュールを一括アップデートする

# perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'

実行表示例

Package namespace         installed    latest  in CPAN file
Algorithm::C3                  0.07      0.08  FLORA/Algorithm-C3-0.08.tar.gz
Apache::Session                1.87      1.88  CHORNY/Apache-Session-1.88.zip
App::CLI                       0.07      0.08  ALEXMV/App-CLI-0.08.tar.gz
Archive::Tar                   1.44      1.48  KANE/Archive-Tar-1.48.tar.gz
Array::Compare                 1.15        33  DAVECROSS/Array-Compare-1.17.tar.gz
Attribute::Handlers         0.78_03      0.84  SMUELLER/Attribute-Handlers-0.84.tar.gz

モダン CPANモジュール

task::Catalyst - フレームワーク

DBIx::Class - O/Rマッパー

Net::Twitter - Twitter用

WWW::Mechanize -

DateTime -

Encode - 文字コード変換 (Jcodeより新しい)

Template - テンプレートエンジン

Moose - 型クラス

プラグマ

use strict

グローバル変数を使えなくするモジュール。

変数はmy宣言されたプライベート変数か、パッケージ名を含めた変数で宣言しなければならなくなる。

  $string = "test";
  &printString();
  
  sub printString{
    print "$string";
  }
  
  # error!
  # 通常のPerlならば、サブルーチンの外のグローバル変数$stringを認識し、そのまま出力する。
  # しかし、strictを宣言した場合、
  # グローバル変数の衝突を防ぐため、グローバル変数そのものを禁止する。
  # 正しく動作させたい場合は 以下のとおり。
  
  my $string = "test";
  &printString($string);
  
  sub printString{
    my ($str) = @_;
    print "$str";
  }
  
  # my宣言をして、プライベート変数に。
  # しかし、そのままだとサブルーチンが変数を認識しないので、引数をして変数を渡してやる。
  # サブルーチンの中でも同じくmy宣言を行い、他のサブルーチンに影響しないようにする。

use warnigs

初期化されていない変数を使おうとすると警告メッセージを出力する。

  $string = "test";
  print "$mojiretu\n";
  # error!
  # 上記の例を見ると、$mojiretuが初期値を出力しようとしているが、
  # 実際に宣言した変数は$string であり、$mojiretuは宣言されていない。
  # 通常のPerlならば変数$mojiretuは "" または 0として扱われ、そのまま動作するが、
  # 安全なスクリプトにするため、このような挙動を禁止する役割。

CPAN

CGI

cgiファイルとして扱うのに、リクエストの受け渡しやタグの記述が簡単に行える。

$cgi = new CGI();

# getやpostのリクエストを受け取る
# URLデコードは自動的に行われる
$mode = $cgi->param('mode');

# HTMLに出力する
print $cgi->header(-charset=>'utf8');
print $cgi->start_hrtl(-title=>'タイトル');
print $cgi->end_html();




CGI::Carp qw(fatalsToBrowser);

Perlのエラーをブラウザで確認できる。

デバッグ用なので本番では消してください。

HTML::Template

perlとhtmlのファイルを分離が簡単にできるモジュール。perlで与えた変数をテンプレートのhtmlに合わせて出力することが出来る。

CGI側

my $temp = HTML::Template->new(
  filename => "Template/sample.htm",
  vanguard_compatibility_mode => 1,
  die_on_bad_params => 0
);
# filename テンプレートファイルへのパス
# die_on_bad_params 双方のパラメータが一致していなくてもエラーを起こすか
# vanguard_compatibility_mode 変数の表記方法を><から %%に変更する
# loop_context_vars ループ用の変数 
#        __first__, __last__, __inner__, __odd__ が使える
# global_vars ループ外の変数をループ内にも適用させる

# 変数を渡す
$temp->param(h1 => "名簿");

# 配列の変数を渡す
%hash = (
'name'=>'衛宮 士郎',
'yomi'=>'えみや しろう',
'email'=>'xxx@xxx.com',
);
foreach my $key( keys %hash ){
  $temp->param($key => $hash{$key});
}
$temp->param(this_loop => \@loop_data);


# HTMLに出力する
$template->output;
    

DBix::Class ( DBIC )

O/Rマッパー

CatalystのController (Root.pmなど) で活用



sub index :Path :Args(0) {
    my ( $self, $c ) = @_;

    $c->stash->{template} = 'index.tt';
    my $id = $c->request->params->{id};
    my $user_id = $c->request->params->{user_id};

    my $where = {
      id => $id,
      user_id => $user_id,
      user_id => $user_id,
    };

    # 記事取得
    my $it = $c->model('DBIC::Records')->search($where,{
      rows => 20,
      order_by => 'id DESC',
    });
    my $rs = $it->page($page);
    
    $c->stash->{html_filter} = sub{ \&html_filter };
    $c->stash->{iterator} = $rs;
    $c->stash->{it_users} = $rs_users;
    $c->stash->{pager} = $rs->pager();
    $c->stash->{records} = [$rs->all];
}

DBIx::Class::Schema::Loader

テーブルスキーマのクラスファイルが大量生成される

perl -M DBIx::Class::Schema::Loader=make_schema_at,dump_to_dir:lib -e 'make_schema_at "My::Schema", {relationships => 1, debug => 1}, ["dbi:mysql:host=mysql**.db.sakura.ne.jp;database=dbname","user","password"]'

LWP::Simple

WEBページの取得がに役立つモジュール。

	my $url = "http://google.co.jp/";
	my $feed = get($url);
	print $feed;
これだけ。

XML::LibXML

XMLの解析・出力が簡単に行える。

XML::Simpleよりも高速で柔軟。

(XML::SimpleだとDOMが配列だったり、スカラーだったりと使いにくい)

use strict;
use warnings;
use XML::LibXML;
use Data::Dumper;

my $file;
$file = $file || 'emoji4unicode.xml';
open (my $fh, '<', $file);
my @lines = <$fh>;
close($fh);
my $xml = join('', @lines);
my $doc = XML::LibXML->new->parse_string($xml);
my @links = $doc->getElementsByTagName('link');

my $emoji = {};
foreach(@es){
  my $str = $_->toString();
  my $att = $_->getAttribute('href');
  print $str. $att;
}

XML::Simple

XMLの解析・出力が簡単に行える。

LWP::Simpleと組み合わせて、APIの利用、スクレイピングなど活用方法は様々。

Twitter形式のXMLをURLのサンプル

Twitter形式のXMLをURLから取得してハッシュ配列で返す

日本語文字コードに対応するため、Jcodeも併用している

sub getUrlToXmlArray{
    my ($url) = @_;
    my $feed = get($url);
    my @list;
    my $xml = XML::Simple->new->XMLin($feed, ForceArray => 1);
    for my $target ( @{$xml->{channel}[0]->{item}} ){
        my $description = $target->{description}[0];
        $description = Jcode->new( $description )->utf8;
        my $pubDate = $target->{pubDate}[0];
        # 時間文字列の解析 調理はお好みで
        my ($wday, $day, $mon, $yaer, $time) = split(/ / ,$pubDate);
        my ($hour, $min, $sec) = split(/:/ ,$time);
        $date =qq|$mon $day|;
        
        my $date = qq|$yaer $mon_num{$mon}/$day - $hour|;
        my %hash = (
          description => $description,
          pubDate => $pubDate,
          day => $day,
          date => $date
        );
    		push (@list, \%hash);
    }
    return @list;
}

XML::RSS

XMLを解析、取得できるモジュール

URLからRSSを取得し、配列に追加する

  foreach $xxx (@url) {
		my $data_from_web = get($xxx);
		my $rss = new XML::RSS;
		$rss->add_module(prefix=>'ag', uri=>'http://purl.org/rss/1.0/modules/aggregation/');
		$rss->parse($data_from_web);
		my $channel = $rss->{'channel'};

	  my $title = $channel->{'title'};
	  my $link = substr($channel->{'link'},7);
		unshift @inp, qq|<li><a href="/l/ink?$link">$title</a></li>\n|;
		
	  my $item_list = $rss->{'items'};
		foreach my $item( @{$item_list}){
			my $i_title = substr($item->{'title'},0,54);
			my $i_link = substr($item->{'link'},7);
			my $i_source = substr($item->{'ag'}->{'source'},0,9);
		  unshift @inp, qq|<li><a href="/l/ink?$i_link">$i_source$i_title</a></li>\n|;
    }
  }

DBI

PerlからMySQLを扱うモジュール。

$dbname="database_sample";
$dbhost="localhost";
$dbuser="user_sample";
$dbpass="asdfghjk";

sub db_connect{
    $dbh = DBI->connect("dbi:mysql:$dbname;host=$dbhost;",$dbuser,$dbpass);
    if(!$dbh){
        $DBI::errstr;
        print"接続失敗";
        exit;
    }
}

sub db_show{
    $sth = $dbh->prepare("select * from name;");
    $rs = $sth->execute();
    while(@nam=$sth->fetchrow_array){
        print "@nam\n";
    }
}

HTML::TagParser

http://www.kawa.net/works/perl/html/tagparser.html

強力なhtmlパーサー

my $html = HTML::TagParser->new( "http://www.kawa.net/xp/index-e.html" );
$elem = $html->getElementById( "id" );
@elem = $html->getElementsByName( "top" );
@elem = $html->getElementsByClassName( "container" );
@elem = $html->getElementsByAttribute( "lang", "ja" );
$text = $elem->innerText();
$text = $elem->id();
$value = $elem->getAttribute( "src" );
$tagname = $elem->tagName();

※innerHTMLはできないようだ。

Web::Scraper

http://e8y.net/mag/013-web-scraper/ http://d.hatena.ne.jp/naoya/20070509/1178686816 http://en.yummy.stripper.jp/?eid=555416

innerHTMLも使うことができる

use Web::Scraper;
use URI;

# 価格部分を yen という名前で取るスクレイパーを作成
my $scraper = scraper {
    process '#buyboxTable b.price',
       'yen' => 'TEXT',
       'html' => 'HTML',
       'url' => '@href';
};
#innerText, innerHTML, classなどの解析に対応

# 悪魔の箱ページのURLオブジェクトを、
my $uri = new URI('http://www.amazon.co.jp/o/ASIN/B000WQKBE2/');

# 先ほどのスクレイパーに渡す。(スクレイピングされる)
my $res = $scraper->scrape($uri);

print $res->{yen}; # ¥ 4,401

YAML::Syck

YAML::Syck

YAML形式テキストデータの解析・出力

#解析
my $config_file = "$ENV{HOME}/.userdata";
my $config = YAML::Syck::LoadFile($config_file) or die $!;
print $config->{username};

#出力
print YAML::Syck::Dump($ref);

.userdata

username: aaaa
password: bbbbbbbb

JSON::XS

JSON形式テキストデータの解析・出力

my $res = $ua->request($req);
my $json = JSON::XS->new->decode( $res->content );

#配列として
for (@$json){
  print $_->{username};
  print $_->{text};
}

Net-SSLeay

https://~ ではじまるセキュアなサイトにアクセスできる。

WWW:Mechanize

ログイン含む会員ページの情報取得ができるモジュール。

ページbotもつくることができる。

	my $mech = WWW:Mechanize->new();

	#ログインページを取得
	$mech->get('http://www.hatena.ne.jp/login');

	#アカウント名とパスワードを書き込んで送信
	$mech->submit_form(
	    form_number => 1,n    fields => {
	        name => 'user@example.com',n        password => '********',n    });

	#ダイアリーの編集ページを取得
	$mech->get('http://d.hatena.ne.jp/iewzgi_lieh/edit');

	#記事を書き込み、「登録する」ボタンをクリックして送信
	$mech->submit_form(
	    form_number => 1,n    fields => {
	        body => $content,n    },n    button => 'edit'
	)


Encode

Jcode.plよりも Jcode.pm , Jcode.pmよりもEncode.pmと進化しています。 日本語の文字コード変換に役立つモジュール。

http://openlab.ring.gr.jp/Jcode/index-j.html

Jcode.pmの場合

	&jcode::convert(\$string,'sjis');
	# $string文字列をShift_JISに変換する。

Encode.pmの場合

  from_to($string, 'utf-8', 'euc-jp');
	# $string文字列をeuc-jpからutf-8に変換する。

WebService::Simple

取得した情報をWebサービス用(JSON形式など)に変換。

use Data::Dumper;
use WebService::Simple;
my $translate = WebService::Simple->new(
    base_url        => "http://ajax.googleapis.com/ajax/services/language/translate",
    response_parser => "JSON",
    params          => {
        v        => '1.0',
        langpair => 'ja|en',
    }
);

my $text = '私は素晴らしい。こんにちわ、世界。';

my $response =  $translate->get({
    q => $text,
});
print "Content-type: text/html\n\n";
print Dumper $response->parse_response;

Catalyst

%./catalyst.pl HelloWorld
%cpan install Catalyst::View::TT
%./catalyst_create.pl view TT TT
 exists "/home/user/framework/catalyst/script/../lib/catalyst/View"
 exists "/home/user/framework/catalyst/script/../t"
created "/home/user/framework/catalyst/script/../lib/catalyst/View/TT.pm"
created "/home/user/framework/catalyst/script/../t/view_TT.t"
%

musql

CREATE TABLE catalyst_memos(
  id INT NOT NULL AUTO_INCREMENT,
  title TEXT,
  text TEXT,
  PRIMARY KEY(id)
);
% cpan install Class::DBI::Loader  
% cpan install Catalyst::Helper::Model::DBIC::Schema  
%./catalyst_create.pl model DBIC(Model名) DBIC::Schema Home::Schema(プロジェクト名::Schema) create=static dbi::mysql:[dbname]:host=[host] [username] [password]

%./MyApp_create.pl controller write

Model/Edit.pm

sub edit :Regex('^edit/(\w+)$') {
    my ( $self, $c ) = @_;
    $c->stash->{template} = 'edit.tt';
    $c->stash->{message} = 'aaaa';
    $c->stash->{id} = $c->request->snippets->[0];
    $c->stash->{memos_title} = $c->model('DBIC::CatalystMemos')->find(1)->title;
    $c->stash->{memos_text} = $c->model('DBIC::CatalystMemos')->find(1)->text;
}

Jifty

Plagger

それPla

http://d.hatena.ne.jp/sirouto2/20061004/p3 http://peace-pipe.blogspot.com/2007/03/plagger-plagger.html

PARでperlをexe化

PerlがされていないWindows環境でもexe化することで単独機能させるようにする。

レポジトリを追加

ppm rep add bribes http://www.bribes.org/perl/ppm

コマンドプロンプト起動して、必要なモジュールをインストール

ppm install File-Temp
ppm install Compress-Zlib
ppm upgrade Compress-Zlib -install -precious
ppm install Archive-Zip
ppm install Module-ScanDeps
ppm install PAR-Dist
ppm install Parse-Binary
ppm install Win32-Exe
ppm install Digest-SHA
ppm install Module-Signature
ppm install PAR
ppm install PAR-Packer (ppコマンドが使えるようになる)

ppコマンドでperlのsample.plからexeを生成

pp -o sample.exe sample.pl

exe化するときにあらゆる関連ファイルを圧縮するため、3MB以上大きいファイルになる。

TkでperlをGUI仕様に

http://www.geocities.jp/m_hiroi/perl_tk/
コマンドプロンプトにて
ppm コマンド実行
TkをActivePerlにインストール
test.pl 作成
use Tk;
use encoding 'cp932';


$top = MainWindow->new();
$button = $top->Button(
    -text => '日本語',
    -command => \&exit
  );
$button->pack();

MainLoop();

その他役立ちモジュールの紹介

Net::Twitter::Lite

xAuthを利用してTwitterにコメントを投稿する

use Net::Twitter::Lite;
sub getTwitter{
  # http://dev.twitter.com/apps/XXXXXX で取得できるやつ
  my %CONSUMER_TOKENS = (
      consumer_key    => 'xxxxxxxxxxxxxxxxxxxx',
      consumer_secret => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  );

  # http://dev.twitter.com/apps/XXXXXX/my_token で取得できるやつ
  my $ACCESS_TOKEN        = '000000-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
  my $ACCESS_TOKEN_SECRET = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

  # constructs a "Net::Twitter::Lite" object
  my $t = Net::Twitter::Lite->new(%CONSUMER_TOKENS);

  # トークンをセットする
  $t->access_token($ACCESS_TOKEN);
  $t->access_token_secret($ACCESS_TOKEN_SECRET);
  return $t;
}


my $nt = getTwitter();
my $status = $nt->update({
  status => 'ついーと';
});

Net::Twitter

Twitterにコメントを投稿する

2010/08/31 Basic認証が無効化され、使えなくなりました

http://search.cpan.org/~cthom/Net-Twitter-1.17/lib/Net/Twitter.pm
#!/usr/bin/perl
use strict;
use warnings;
use Net::Twitter;
my $twit = Net::Twitter->new(
  username => 'username',  #ユーザー名
  password => 'password',  #パスワード
  );
$twit->update('こんにちわこんにちわ');

さくらでは標準モジュールの他に JSON/Any.pm JSON/PP/ が必要

Net::Ftp

Perlを使ってFTP接続&データ転送

単品を送る

use Net::FTP;

my $host = 'host';	# 接続先
my $user = 'user';	# FTPのユーザ
my $pass = '****';	# FTPのパスワード
my $local_file = '/test.htm';	# ローカルファイル
my $remote_file = 'test.htm';	# リモートのファイル(ここに保存)

my $ftp = Net::FTP->new($host) or die "can not connection: $@";
$ftp->login($user, $pass) or die $ftp->message;	# ログイン
$ftp->binary;	# バイナリモードに変更
$ftp->put($local_file, $remote_file) or warn $ftp->message;	# ファイル転送
$ftp->quit;	# 終了

正規表現で自動化


%FTP=(
  'ftp.exsample.com'=> { host    => 'ftp.exsample.com',
                       user    => 'account',
                       pass    => 'password',
                       remote  => '/public_html/html',
                       local   => '../html',
                       pattern => '.htm$|.html$|.css$' } );
                                     
sub ftp{
  my ( $which ) = @_;

  my $host   = $FTP{$which}{'host'}   ;
  my $user   = $FTP{$which}{'user'}   ;
  my $pass   = $FTP{$which}{'pass'}   ;
  my $remote = $FTP{$which}{'remote'} ;
  my $local  = $FTP{$which}{'local'}  ;
  my $pattern= $FTP{$which}{'pattern'}   ;

  if( !opendir( DIR, $local ) ){
    return 'cannot open folder: ' . $local;
  }
  my @files = readdir( DIR );
  closedir( DIR );

  $ftp = Net::FTP->new( $host, Debug => 0)
                or return "Cannot connect to some.host.name: $@";
  $ftp->login( $user, $pass ) or return "Cannot login ", $ftp->message;
  $ftp->binary( )  or return "Cannot mode bin ", $ftp->message;
  foreach my $file (@files) {
    if( -f "$local/$file" && $file =~ /$pattern/ ){
      $ftp->put( "$local/$file", "$remote/$file" )
                   or return "Cannot put ", $ftp->message;
    }
  }
  $ftp->quit;
  return '';
}

さくらのレンタルサーバにCPANをインストール

http://blog.webox.biz/2007/01/cpan_1.html

sshを使うので、スタンダードプラン以上

ディレクトリを用意
$ mkdir -p ~/local/var/db/pkg

CPANに関する設定を編集
$ vi ~/.cpan/CPAN/MyConfig.pm
で,いくつかの項目を設定する.mbuildpl_arg 以外は存在するので書き換える
----
'make_install_arg' => qq[SITEPREFIX=$ENV{HOME}/local],
'makepl_arg' => qq[INSTALLDIRS=site LIB=$ENV{HOME}/local/lib/perl5 PREFIX=$ENV{HOME}/local],
'mbuildpl_arg' => qq[./Build --install_base $ENV{HOME}/local],
'urllist' => [q[ftp://ftp.cpan.jp/], q[ftp://ftp.kddilabs.jp/CPAN/]],
----

各種の環境変数を設定
$ echo 'setenv PATH $HOME/local/bin:$PATH' >> ~/.cshrc
$ echo 'setenv PERL5LIB $HOME/local/lib/perl5:$HOME/local/lib/perl5/site_perl' >> ~/.cshrc

環境設定を反映
$ source ~/.cshrc

CPANをアップデート(とりあえずはすべてEnterでOK)
$ cpan -i Bundle::CPAN

CPANを起動(設定項目はEnterで無視)
$ cpan

あとはインストールしたいモジュールをどんどん書いていくだけ.便利.

% cpan[1]> install WWW::Mixi
% cpan[2]> install Jcode
% cpan[3]> install LWP::Simple

さくらのレンタルサーバで最初から使えるCPANモジュール

CPANインストールなどの設定をしなくても最初からインストールされています。

2009/02 スタンダード

LinuxでCPANインストール時の表示例

 ~> perl -v

This is perl, v5.6.1 built for i386-freebsd

Copyright 1987-2001, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

~> cpan
cpan: Command not found.
 ~> perl -MCPAN -e shell

/home/c11xpnl8/.cpan/CPAN/MyConfig.pm initialized.


CPAN is the world-wide archive of perl resources. It consists of about
100 sites that all replicate the same contents all around the globe.
Many countries have at least one CPAN site already. The resources
found on CPAN are easily accessible with the CPAN.pm module. If you
want to use CPAN.pm, you have to configure it properly.

If you do not want to enter a dialog now, you can answer 'no' to this
question and I'll try to autoconfigure. (Note: you can revisit this
dialog anytime later by typing 'o conf init' at the cpan prompt.)

Are you ready for manual configuration? [yes]


The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide directory or a personal directory.



I see you already have a  directory
    /home/c11xpnl8/.cpan
Shall we use it as the general CPAN build and cache directory?

CPAN build and cache directory? [/home/c11xpnl8/.cpan]


If you want, I can keep the source files after a build in the cpan
home directory. If you choose so then future builds will take the
files from there. If you don't want to keep them, answer 0 to the
next question.



How big should the disk cache be for keeping the build directories
with all the intermediate files?

Cache size for build directory (in MB)? [10]


By default, each time the CPAN module is started, cache scanning
is performed to keep the cache size in sync. To prevent from this,
disable the cache scanning with 'never'.

Perform cache scanning (atstart or never)? [atstart]


To considerably speed up the initial CPAN shell startup, it is
possible to use Storable to create a cache of metadata. If Storable
is not available, the normal index mechanism will be used.

Cache metadata (yes/no)? [yes]


The next option deals with the charset your terminal supports. In
general CPAN is English speaking territory, thus the charset does not
matter much, but some of the aliens out there who upload their
software to CPAN bear names that are outside the ASCII range. If your
terminal supports UTF-8, you say no to the next question, if it
supports ISO-8859-1 (also known as LATIN1) then you say yes, and if it
supports neither nor, your answer does not matter, you will not be
able to read the names of some authors anyway. If you answer no, names
will be output in UTF-8.

Your terminal expects ISO-8859-1 (yes/no)? [yes]


The CPAN module can detect when a module that which you are trying to
build depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Please set your
policy to one of the three values.

Policy on building prerequisites (follow, ask or ignore)? [ask]


The CPAN module will need a few external programs to work properly.
Please correct me, if I guess the wrong path for a program. Don't
panic if you do not have some of them, just press ENTER for those. To
disable the use of a download program, you can type a space followed
by ENTER.

Where is your gzip program? [/usr/bin/gzip]
Where is your tar program? [/usr/bin/tar]
Where is your unzip program? [/usr/local/bin/unzip]
Where is your make program? [/usr/bin/make]
Where is your lynx program? [/usr/local/bin/lynx]
Where is your wget program? [/usr/local/bin/wget]
Where is your ncftpget program? [/usr/local/bin/ncftpget]
Where is your ftp program? [/usr/bin/ftp]
What is your favorite pager program? [more]
What is your favorite shell? [/bin/tcsh]


Every Makefile.PL is run by perl in a separate process. Likewise we
run 'make' and 'make install' in processes. If you have any
parameters (e.g. PREFIX, LIB, UNINST or the like) you want to pass
to the calls, please specify them here.

If you don't understand this question, just press ENTER.

Parameters for the 'perl Makefile.PL' command?
Typical frequently used settings:

    POLLUTE=1        increasing backwards compatibility
    LIB=~/perl       non-root users (please see manual for more hints)


perl cgi