Making My Own
    CPAN
         brian d foy
Stonehenge Consulting Services
         Frozen Perl
      February 16, 2008
Goals

• Make my own version of CPAN
 (MyCPAN)

• Freeze MyCPAN
• Make a CPAN for something else
PAUSE
• http://pause.perl.org
• Perl Authors Upload SErver (PAUSE)
• Gateway for adding modules to CPAN
• CPAN Master mirr...
PAUSE index files
• PAUSE indexes modules
• Creates index files for CPAN tool
  chain

 • modules/02packages.details.txt.g...
Tool chain
• quot;Third Partyquot; projects
• CPAN Search
• CPAN.pm
• CPANPLUS
• AnnoCPAN
CPAN.pm
• Uses index files to find distro
• Looks for path on mirror
 • http://mirror/...
 • .../authors/
 • .../B/BD/BDFO...
Installing a module
 • Get from first mirror that has it
 • Check checksum
 • Unpack, run Makefile.PL or Build.PL
 • Disco...
MiniCPAN
• A local CPAN mirror
• Only has latest versions, indices
• Point CPAN.pm at local mirror
• Update from network
•...
CPAN::Mini

• The module behind minicpan
• by Ricardo SIGNES
• Configurable
• Programmable
MicroCPAN
  CPAN::Mini->update_mirror(
	...,
	path_filters     => [
		sub { !( $_[0] =~ /BDFOY/ ) }
		],
	module_filters  ...
MyCPAN

• Only the modules I want
• Only the versions I want
• Extra, private modules
• Public modules with local patches
...
CPAN::Mini::Inject
• Creates a parallel archive
• Update MiniCPAN first
• Inject parallel archive into
  MiniCPAN

• Updat...
Replacing public distros


• Sometimes I want local patches
 • absent author
 • truculent author
• Don’t want the latest d...
BackPAN

• http://backpan.cpan.org
• All modules ever uploaded to PAUSE
• Not integrated with CPAN tool chain
• Which dist...
Finding old distros


• It's all on BackPAN
• Brute force, right now
• Unpack a distro and check
• Repeat until you find it
MyCPAN on a CD
• I have all the bits to carry around
  MyCPAN

 • MiniCPAN
 • Private modules
 • Configure CPAN.pm
• Need ...
MyCPAN (Frozen Perl 2008 Lightning Talk)
Upcoming SlideShare
Loading in...5
×

MyCPAN (Frozen Perl 2008 Lightning Talk)

3,460

Published on

Published in: Technology, Business
2 Comments
0 Likes
Statistics
Notes
  • I can't wait to see more presentations from you.
    http://www.teethgrindinginsleep.net/
    http://www.teethgrindinginsleep.net/how-to-stop-teeth-grinding-at-night/
    http://www.teethgrindinginsleep.net/get-a-mouth-guard-to-stop-teeth-grinding-at-night/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Outstanding demonstration. Really clear along with useful
    Teisha
    http://dashinghealth.com http://healthimplants.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total Views
3,460
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
2
Likes
0
Embeds 0
No embeds

No notes for slide

MyCPAN (Frozen Perl 2008 Lightning Talk)

  1. 1. Making My Own CPAN brian d foy Stonehenge Consulting Services Frozen Perl February 16, 2008
  2. 2. Goals • Make my own version of CPAN (MyCPAN) • Freeze MyCPAN • Make a CPAN for something else
  3. 3. PAUSE • http://pause.perl.org • Perl Authors Upload SErver (PAUSE) • Gateway for adding modules to CPAN • CPAN Master mirror PAUSE • modules/ • authors/
  4. 4. PAUSE index files • PAUSE indexes modules • Creates index files for CPAN tool chain • modules/02packages.details.txt.gz • modules/03modlist.data.gz • modules/06perms.txt.gz
  5. 5. Tool chain • quot;Third Partyquot; projects • CPAN Search • CPAN.pm • CPANPLUS • AnnoCPAN
  6. 6. CPAN.pm • Uses index files to find distro • Looks for path on mirror • http://mirror/... • .../authors/ • .../B/BD/BDFOY/Foo-1.23.tar.gz
  7. 7. Installing a module • Get from first mirror that has it • Check checksum • Unpack, run Makefile.PL or Build.PL • Discover dependencies • Find, get, install dependencies
  8. 8. MiniCPAN • A local CPAN mirror • Only has latest versions, indices • Point CPAN.pm at local mirror • Update from network • Install without network
  9. 9. CPAN::Mini • The module behind minicpan • by Ricardo SIGNES • Configurable • Programmable
  10. 10. MicroCPAN CPAN::Mini->update_mirror( ..., path_filters => [ sub { !( $_[0] =~ /BDFOY/ ) } ], module_filters => [ qr/Test/, ], );
  11. 11. MyCPAN • Only the modules I want • Only the versions I want • Extra, private modules • Public modules with local patches • Internal server or removable media
  12. 12. CPAN::Mini::Inject • Creates a parallel archive • Update MiniCPAN first • Inject parallel archive into MiniCPAN • Update PAUSE index files locally • Update CHECKSUMS
  13. 13. Replacing public distros • Sometimes I want local patches • absent author • truculent author • Don’t want the latest distro
  14. 14. BackPAN • http://backpan.cpan.org • All modules ever uploaded to PAUSE • Not integrated with CPAN tool chain • Which distro has module version?
  15. 15. Finding old distros • It's all on BackPAN • Brute force, right now • Unpack a distro and check • Repeat until you find it
  16. 16. MyCPAN on a CD • I have all the bits to carry around MyCPAN • MiniCPAN • Private modules • Configure CPAN.pm • Need to discover MyCPAN location

×