開発環境
- OS X Lion - Apple(OS)
- TextWrangler(Text Editor) (BBEditの機能制限無料版、light版)
- Script言語:Perl
『初めてのPerl 第5版』(Randal L. Schwartz, Tom Phoenix, brian d foy 共著、近藤 嘉雪 訳、オライリー・ジャパン、2009年、ISBN978-4-87311-427-9) の10章(Perlモジュール), 11.4(練習問題)1を解いてみる。
1.
やり方の1つ。(「やり方は何通りもある」(TIMTOWTDI(There Is More Than One Way To Do It.)))
コード(TextWrangler)
#!/usr/bin/env perl use strict; use warnings; use Module::CoreList; my %modules = %{ $Module::CoreList::version{5.008} }; for(sort keys %modules){ print "$_\n"; }
入出力結果(Terminal)
$ ls Module-CoreList-2.65 desktop kamimura$ cd 'module-corelist-2.65' module-corelist-2.65 kamimura$ ls Changes Makefile.PL lib MANIFEST README t META.json corelist META.yml identify-dependencies module-corelist-2.65 kamimura$ perl makefile.pl Checking if your kit is complete... Looks good Writing Makefile for Module::CoreList $ sudo make install Password: Skip blib/lib/Module/CoreList.pm (unchanged) Skip blib/lib/Module/CoreList.pod (unchanged) cp corelist blib/script/corelist /opt/local/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/corelist Manifying blib/man1/corelist.1pm Manifying blib/man3/Module::CoreList.3pm Installing /opt/local/lib/perl5/5.12.3/Module/CoreList.pm Installing /opt/local/lib/perl5/5.12.3/Module/CoreList.pod Installing /opt/local/share/man/man1p/corelist.1pm Installing /opt/local/share/man/man3p/Module::CoreList.3pm Appending installation info to /opt/local/lib/perl5/5.12.3/darwin-multi-2level/perllocal.pod $ ./perl_program AnyDBM_File Attribute::Handlers AutoLoader AutoSplit B B::Asmdata B::Assembler B::Bblock B::Bytecode B::C B::CC B::Concise B::Debug B::Deparse B::Disassembler B::Lint B::Showlex B::Stackobj B::Stash B::Terse B::Xref Benchmark ByteLoader CGI CGI::Apache CGI::Carp CGI::Cookie CGI::Fast CGI::Pretty CGI::Push CGI::Switch CGI::Util CPAN CPAN::FirstTime CPAN::Nox Carp Carp::Heavy Class::ISA Class::Struct Config Cwd DB DB_File Data::Dumper Devel::DProf Devel::PPPort Devel::Peek Devel::SelfStubber Digest Digest::MD5 DirHandle Dumpvalue DynaLoader Encode Encode::Alias Encode::Byte Encode::CJKConstants Encode::CN Encode::CN::HZ Encode::Config Encode::EBCDIC Encode::Encoder Encode::Encoding Encode::Guess Encode::JP Encode::JP::H2Z Encode::JP::JIS7 Encode::KR Encode::KR::2022_KR Encode::MIME::Header Encode::Symbol Encode::TW Encode::Unicode English Env Exporter Exporter::Heavy ExtUtils::Command ExtUtils::Command::MM ExtUtils::Constant ExtUtils::Embed ExtUtils::Install ExtUtils::Installed ExtUtils::Liblist ExtUtils::Liblist::Kid ExtUtils::MM ExtUtils::MM_Any ExtUtils::MM_BeOS ExtUtils::MM_Cygwin ExtUtils::MM_DOS ExtUtils::MM_MacOS ExtUtils::MM_NW5 ExtUtils::MM_OS2 ExtUtils::MM_UWIN ExtUtils::MM_Unix ExtUtils::MM_VMS ExtUtils::MM_Win32 ExtUtils::MM_Win95 ExtUtils::MY ExtUtils::MakeMaker ExtUtils::Manifest ExtUtils::Miniperl ExtUtils::Mkbootstrap ExtUtils::Mksymlists ExtUtils::Packlist ExtUtils::XSSymSet ExtUtils::testlib Fatal Fcntl File::Basename File::CheckTree File::Compare File::Copy File::DosGlob File::Find File::Glob File::Path File::Spec File::Spec::Cygwin File::Spec::Epoc File::Spec::Functions File::Spec::Mac File::Spec::OS2 File::Spec::Unix File::Spec::VMS File::Spec::Win32 File::Temp File::stat FileCache FileHandle Filter::Simple Filter::Util::Call FindBin GDBM_File Getopt::Long Getopt::Std Hash::Util I18N::Collate I18N::LangTags I18N::LangTags::List I18N::Langinfo IO IO::Dir IO::File IO::Handle IO::Pipe IO::Poll IO::Seekable IO::Select IO::Socket IO::Socket::INET IO::Socket::UNIX IPC::Msg IPC::Open2 IPC::Open3 IPC::Semaphore IPC::SysV JNI JPL::AutoLoader JPL::Class JPL::Compile List::Util Locale::Constants Locale::Country Locale::Currency Locale::Language Locale::Maketext Locale::Script MIME::Base64 MIME::QuotedPrint Math::BigFloat Math::BigFloat::Trace Math::BigInt Math::BigInt::Calc Math::BigInt::Trace Math::BigRat Math::Complex Math::Trig Memoize Memoize::AnyDBM_File Memoize::Expire Memoize::ExpireFile Memoize::ExpireTest Memoize::NDBM_File Memoize::SDBM_File Memoize::Storable NDBM_File NEXT Net::Cmd Net::Config Net::Domain Net::FTP Net::FTP::A Net::FTP::E Net::FTP::I Net::FTP::L Net::FTP::dataconn Net::NNTP Net::Netrc Net::POP3 Net::Ping Net::SMTP Net::Time Net::hostent Net::netent Net::protoent Net::servent O ODBM_File OS2::DLL OS2::ExtAttr OS2::PrfDB OS2::Process OS2::REXX Opcode POSIX PerlIO PerlIO::encoding PerlIO::scalar PerlIO::via PerlIO::via::QuotedPrint Pod::Checker Pod::Find Pod::Functions Pod::Html Pod::InputObjects Pod::LaTeX Pod::Man Pod::ParseLink Pod::ParseUtils Pod::Parser Pod::Plainer Pod::Select Pod::Text Pod::Text::Color Pod::Text::Overstrike Pod::Text::Termcap Pod::Usage SDBM_File Safe Scalar::Util Search::Dict SelectSaver SelfLoader Shell Socket Storable Switch Symbol Sys::Hostname Sys::Syslog Term::ANSIColor Term::Cap Term::Complete Term::ReadLine Test Test::Builder Test::Harness Test::Harness::Assert Test::Harness::Iterator Test::Harness::Straps Test::More Test::Simple Text::Abbrev Text::Balanced Text::ParseWords Text::Soundex Text::Tabs Text::Wrap Thread Thread::Queue Thread::Semaphore Thread::Signal Thread::Specific Tie::Array Tie::File Tie::Handle Tie::Hash Tie::Memoize Tie::RefHash Tie::Scalar Tie::SubstrHash Time::HiRes Time::Local Time::gmtime Time::localtime Time::tm UNIVERSAL Unicode Unicode::Collate Unicode::Normalize Unicode::UCD User::grent User::pwent VMS::DCLsym VMS::Filespec VMS::Stdio XS::APItest XS::Typemap XSLoader attributes attrs autouse base bigint bignum bigrat blib bytes charnames constant diagnostics encoding fields filetest if integer less lib locale open ops overload re sigtrap sort strict subs threads threads::shared utf8 vars vmsish warnings warnings::register $
0 コメント:
コメントを投稿