cpanシェルでは、/ regexp /のみ、またはすべてのモジュールをアップグレードできます。CPANによってのみインストールされたモジュールをアップグレードする場合、どうすればよいですか?
26768 次
5 に答える
20
perlモジュールの管理にはcpanm「family」スクリプトを使用することをお勧めします。
cpanmをインストールします
- すでに持っている場合は、これをスキップしてください
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
- freebsdを使用している場合は、代わりにコマンドfetchをcurlすることができます(man fetchを参照)。
アップグレードcpanm
- 今すぐインストールした場合は、これをスキップしてください
cpanm --self-upgrade --sudo
cpan-outdatedをインストールします
cpanm App::cpanoutdated
- cpan-outdatedコマンドはCPAN(r)と同じように機能しますが、IMOはシェルから使用する方が適切です
たとえば、私のノートブックだけが次のような結果をもたらします。
marvin:~ jomo$ cpan-outdated
S/SM/SMUELLER/Attribute-Handlers-0.93.tar.gz
D/DR/DROLSKY/Class-Load-0.20.tar.gz
D/DR/DROLSKY/DateTime-TimeZone-1.47.tar.gz
... etc
cpan-outdated&upgradeモジュールを実行する
cpan-outdated -p | cpanm
変更点
何が変更されたか(変更ログ)を確認したい場合は、cpan-listchangesをインストールしてみてください
cpanm App::cpanlistchanges
- そしてそれを次のように使用します:
cpan-listchanges Plack
-ローカルとCPANの最新のものの間でPlackで何が変更されたかを確認してください
于 2012-07-27T07:25:10.313 に答える
7
# cpan
cpan> h
Display Information (ver 1.9800)
command argument description
a,b,d,m WORD or /REGEXP/ about authors, bundles, distributions, modules
i WORD or /REGEXP/ about any of the above
ls AUTHOR or GLOB about files in the author's directory
(with WORD being a module, bundle or author name or a distribution
name of the form AUTHOR/DISTRIBUTION)
Download, Test, Make, Install...
get download clean make clean
make make (implies get) look open subshell in dist directory
test make test (implies make) readme display these README files
install make install (implies test) perldoc display POD documentation
Upgrade
r WORDs or /REGEXP/ or NONE report updates for some/matching/all modules
upgrade WORDs or /REGEXP/ or NONE upgrade some/matching/all modules
Pragmas
force CMD try hard to do command fforce CMD try harder
notest CMD skip testing
Other
h,? display this menu ! perl-code eval a perl command
o conf [opt] set and query options q quit the cpan shell
reload cpan load CPAN.pm again reload index load newer indices
autobundle Snapshot recent latest CPAN uploads
以下のコマンドを実行するだけで、要求どおりの結果が得られます。
cpan> upgrade
于 2012-07-27T02:07:53.053 に答える
5
$ cpan Module
と
cpan> install Module
新しいバージョンが利用可能な場合はアップグレードし、すでに最新バージョンがある場合は何もしません。
于 2012-07-27T06:14:45.053 に答える
4
最初にcpanにログインする必要があります。次に、プロンプトで1回、次のように入力します。
r [enter]
インストールされているアップグレード可能なモジュールのリストが出力されます。そのリストを作成したら、次を使用できます。
cpan upgrade <MODULE NAME>
アップグレードするには、モジュールの名前に置き換えるだけです。
よろしく、
ジェフ
于 2012-07-27T04:10:04.317 に答える
1
perlパッケージを再インストールすると、を使用して自動的にアップグレードされます
cpanm --reinstall <Module_Name>
于 2020-04-29T13:16:08.703 に答える