開発環境
- OS X Mavericks - Apple(OS)
- BBEdit - Bare Bones Software, Inc., Emacs (Text Editor)
- Perl (プログラミング言語)
初めてのPerl 第6版 (Randal L. Schwartz (著)、brian d foy (著)、Tom Phoenix (著)、近藤 嘉雪 (翻訳)、オライリージャパン)、11章(Perlモジュール)の11.4(練習問題)1.を解いてみる。
その他参考書籍
11.4(練習問題)1.
コード(BBEdit, Emacs)
sample251_1.pl
#!/usr/bin/env perl # use diagnostics; use strict; use warnings; use 5.016; use utf8; binmode STDIN, ':utf8'; binmode STDOUT, ':utf8'; binmode STDERR, ':utf8'; use Module::CoreList; my %modules1 = %{ $Module::CoreList::version{5.014} }; my %modules2 = %{ $Module::CoreList::version{5.016} }; # Perl 5.16にあってPerl 5.14にないPerlに付属するモジュールを表示 for (keys %modules2) { if (! exists $modules1{$_}) { say $_; } }
入出力結果(Terminal)
$ sudo cpan Module::CoreList Password: $ sudo cpan Module::CoreList Password: Reading '/Users/kamimura/.cpan/Metadata' Database was generated on Sat, 29 Mar 2014 00:17:02 GMT Fetching with Net::FTP: ftp://ftp.u-aizu.ac.jp/pub/CPAN/authors/01mailrc.txt.gz Reading 'y/authors/01mailrc.txt.gz' ............................................................................DONE Fetching with Net::FTP: ftp://ftp.u-aizu.ac.jp/pub/CPAN/modules/02packages.details.txt.gz Reading 'y/modules/02packages.details.txt.gz' Database was generated on Mon, 14 Apr 2014 23:29:02 GMT HTTP::Date not available .............. New CPAN.pm version (v2.00) available. [Currently running version is v1.9800] You might want to try install CPAN reload cpan to both upgrade CPAN.pm and run the new version without leaving the current session. ..............................................................DONE Fetching with Net::FTP: ftp://ftp.u-aizu.ac.jp/pub/CPAN/modules/03modlist.data.gz Reading 'y/modules/03modlist.data.gz' DONE Writing /Users/kamimura/.cpan/Metadata Running install for module 'Module::CoreList' Running make for B/BI/BINGOS/Module-CoreList-3.09.tar.gz Fetching with Net::FTP: ftp://ftp.u-aizu.ac.jp/pub/CPAN/authors/id/B/BI/BINGOS/Module-CoreList-3.09.tar.gz Fetching with Net::FTP: ftp://ftp.u-aizu.ac.jp/pub/CPAN/authors/id/B/BI/BINGOS/CHECKSUMS Checksum for y/authors/id/B/BI/BINGOS/Module-CoreList-3.09.tar.gz ok Cannot gzopen y/authors/id/B/BI/BINGOS/Module-CoreList-3.09.tar.gz: cannot open file 'y/authors/id/B/BI/BINGOS/Module-CoreList-3.09.tar.gz': No such file or directory Cannot gzopen y/authors/id/B/BI/BINGOS/Module-CoreList-3.09.tar.gz: cannot open file 'y/authors/id/B/BI/BINGOS/Module-CoreList-3.09.tar.gz': No such file or directory Directory 'y/BINGOS-Nz9zc5' has gone. Cannot continue. $ ./sample251_1.pl Locale::Codes::LangFam_Codes Pod::Perldoc::ToTerm ExtUtils::Typemaps::Cmd Locale::Codes::LangFam_Retired _charnames Locale::Codes::LangVar_Codes Pod::Perldoc::ToANSI Locale::Codes::Currency_Retired Locale::Codes::LangExt_Retired Locale::Codes::Language_Codes ExtUtils::ParseXS::Utilities Locale::Codes::Language_Retired Locale::Codes::Script_Codes Locale::Codes::LangFam perlfaq ExtUtils::Typemaps::Type ExtUtils::Typemaps::InputMap Locale::Codes::Constants Locale::Codes::LangVar CPAN::Exception::yaml_process_error CPAN::Meta::Requirements ExtUtils::ParseXS::CountLines Locale::Codes::LangExt_Codes Sys::Syslog::Win32 ExtUtils::ParseXS::Constants unicore::Name Locale::Codes::Currency_Codes Pod::Functions::Functions Locale::Codes::Country_Retired ExtUtils::Typemaps::OutputMap Locale::Codes::LangVar_Retired Locale::Codes::Script_Retired Locale::Codes::Country_Codes ExtUtils::Typemaps PerlIO::mmap Locale::Codes::LangExt arybase $
0 コメント:
コメントを投稿