CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl...
Transcript of CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl...
![Page 1: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/1.jpg)
CPAN::Mini and Pod::Webserver
Raleigh Perl Mongers
![Page 2: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/2.jpg)
perl development without a rope
➲ Continue coding without internet access➲ Install CPAN modules➲ Retain access to documentation
![Page 3: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/3.jpg)
Origins
➲ This module came from an article written by Randal Schwartz http://www.stonehenge.com/merlyn/LinuxMag/col42.html
![Page 4: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/4.jpg)
Requires Preparation
➲ These will only save you if you've done your homework; this homework requires a con-nection.
➲ First install these modules➲ Then use these modules to mirror CPAN➲ May place your mirror onto a cdrom for your
laptop bag
![Page 5: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/5.jpg)
the quick and the slow
➲ As root, perl -MCPAN -e "install CPAN::Mini”
➲ Choose a mirror from http://www.cpan.org/MIRRORED.BY
➲ I chose ftp://ftp.ncsu.edu/pub/mirror/CPAN/➲ Log out of root.➲ minicpan \ -l /home/boaks/mirrors/minicpan \ -r ftp://ftp.ncsu.edu/pub/mirror/CPAN/
![Page 6: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/6.jpg)
CPAN::Mini
➲ A few minutes to install the module➲ 166 minutes to create the local mirror➲ 470M disk space➲ 9441 *.tar.gz files
![Page 7: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/7.jpg)
Using your mirror
➲ cpan> o conf urllist urllist ftp://ftp.ncsu.edu/pub/mirror/CPAN/ ➲ cpan> o conf urllist unshift
file:///home/boaks/mirrors/minicpan
➲ cpan> o conf urllist urllist file:///home/boaks/mirrors/minicpan ftp://ftp.ncsu.edu/pub/mirror/CPAN/➲ cpan> o conf commit
commit: wrote /usr/lib/perl5/5.8.5/CPAN/Config.pm
![Page 8: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/8.jpg)
CPAN::Mini::Phalanx100
➲ A few minutes to install the module➲ A few minutes to create the local mirror➲ 152 *.tar.gz files➲ 22M disk space➲ Compared to 470M for full CPAN::Mini➲ Edit your CPAN Config.pm to point to this
mirror instead of the cpanmini mirror
![Page 9: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/9.jpg)
Very similar to non-Phalanx
➲ minicpan-phalanx \ -l /home/boaks/mirrors/minicpan-phalanx \ -r ftp://ftp.ncsu.edu/pub/mirror/CPAN/
![Page 10: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/10.jpg)
Phalanx100
➲ Bundle::Phalanx100 to install all the Pha-lanx100 modules
➲ A list of the 100 is at http://qa.perl.org/phalanx/100/
![Page 11: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/11.jpg)
Next Steps
➲ Explore CPAN::Mini::Inject to add your own modules to the local mirror.
➲ You'll be able to update the unadulterated modules and keep your local modules sync'ed in the mirror.
![Page 12: CPAN::Mini and Pod::Webserverraleigh.pm.org/past-meetings/RaleighPerlMongers20050818.pdf · perl development without a rope Continue coding without internet access Install CPAN modules](https://reader034.fdocuments.us/reader034/viewer/2022052003/60164fc2c7579118510e9c8c/html5/thumbnails/12.jpg)
Pod::Webserver
➲ minimal web server to serve local Perl doc-umentation
➲ 'podwebserver' command starts local web-server
➲ Browse to http://localhost:8020/➲ Presents index of modules➲ Don't forget iptables can get in your way