• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Reverse Installing CPAN
 

Reverse Installing CPAN

on

  • 2,260 views

My presentation from the first Polish Perl Workshop, on taking an existing Perl installation and making a CPAN-like repository from it.

My presentation from the first Polish Perl Workshop, on taking an existing Perl installation and making a CPAN-like repository from it.

Statistics

Views

Total Views
2,260
Views on SlideShare
1,139
Embed Views
1,121

Actions

Likes
1
Downloads
0
Comments
0

9 Embeds 1,121

http://blogs.perl.org 1056
https://twitter.com 37
http://newsblur.com 13
http://news.int80.biz 8
http://plus.url.google.com 2
http://translate.googleusercontent.com 2
http://www.hanrss.com 1
http://erakis.eu 1
http://cloud.feedly.com 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Reverse Installing CPAN Reverse Installing CPAN Presentation Transcript

    • Reverse InstallingCPANbrian d foybrian.d.foy@gmail.comMay 26, 2013 • 1st Polish Perl Workshop
    • MyCPANisArcheology
    • Perl installation↓CPAN-like repo
    • 104 files
    • One time runto startbettercode management
    • 95%9,500 of 10,000 files
    • Indexing
    • MyCPAN::Indexer.pm.yaml.yaml
    • --- !!perl/hash:MyCPAN::App::DPAN::Indexerdist_info:dist_archive_type: tgzmodule_info:- bytesize: 3547file_mime_type: text/plainmd5: e23b82c35130ad2d56ce8bc2a13accc8mtime: 1197166594name: lib/SimpleLinkChecker.pmpackages:- HTTP::SimpleLinkCheckerprimary_package: HTTP::SimpleLinkCheckerversion_info:filename: lib/SimpleLinkChecker.pmidentifier:VERSIONline_number: 19sigil: $value: 1.15modules:- lib/SimpleLinkChecker.pmyaml
    • Inspection
    • warnings.pm|45e2642a40bb2d1b2517b6b0043f0702XSLoader.pm|82e9e9412227d8a8280d8ddad0a68d6dApp/Cpan.pm|4de7e0fe4c0f0e93265a41ae5092a7e2App/Prove/State.pm|2a21ed7a3cbb58df1f5516840c108703Archive/Extract.pm|c7af3f54ce42a74b7e728a6ee22a9f21Archive/Tar.pm|aaf9e4dcfa573dba6d29c88cfc7dd12cArchive/Tar/Constant.pm|ca973aae524b7017d672f5bc4a33d9b4HTTP/SimpleLinkChecker|e23b82c35130ad2d56ce8bc2a13accc8
    • 45e2642a40bb2d1b2517b6b0043f070282e9e9412227d8a8280d8ddad0a68d6d4de7e0fe4c0f0e93265a41ae5092a7e22a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f21aaf9e4dcfa573dba6d29c88cfc7dd12cca973aae524b7017d672f5bc4a33d9b4e23b82c35130ad2d56ce8bc2a13accc8Local MyCPANad3e5f671b1a0d8a166b0c47c064c829d9d478b5bf17a084ece23dc89e846397b2bb5bc3b63895e7800e61e0af34f29771fec9527186458eb49908482ab0a0ac9a0370ce4b8ebad611812b1c6750f83cc59010149f1675b8132698dd5126db204d48c8f5c2ee07e53f6ac67e997cb5d66801455ffe35cf1eaef66bbd6c7169ab766f973c47980f59be94a266979b6fb879dd99ed0ec6db5e0b4f04c7ad00d052217ac40ea8f9e4becda8a13f8ef81933e23b82c35130ad2d56ce8bc2a13accc8e1dbfb093b8a91044c98cca07f47b608459aa989c0f46d5817496374597ee1ea6243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e3454918346910ca43bf49c8cd81b0f606d2093d767be71b51293cd07a1d7c7e118adc8a13040b42f0f2ef3b51828c3259d05116f6196baa5a27a351d51b60bb5c00cd55580e048957ca53b51e2e2c5d112fbb21f1baee56f162ef27e2dee9d039294d78df34112638334b169de2033f4b6e5efef11c
    • Problem 0Bad Data
    • MyCPAN::Indexerhas to keepupdating
    • MyCPAN::Indexeris gettingbetter
    • MyCPAN::Indexerhas toreindex
    • -1%100 of 10,000 files
    • Problem 1Some releaseshave thesame exact files
    • 766f973c47980f59be94a266979b6fb8e1dbfb093b8a91044c98cca07f47b608c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4e23b82c35130ad2d56ce8bc2a13accc8Local MyCPANFoo-Bar-1.23.tgzad3e5f671b1a0d8a166b0c47c064c829c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Foo-Bar-1.34.tgz9a0370ce4b8ebad611812b1c6750f83cc59010149f1675b8132698dd5126db20e23b82c35130ad2d56ce8bc2a13accc86801455ffe35cf1eaef66bbd6c7169abFoo-Bar-1.56.tgz766f973c47980f59be94a266979b6fb8c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Baz-1.04.tgze1dbfb093b8a91044c98cca07f47b608e23b82c35130ad2d56ce8bc2a13accc8Quack-0.01.tgz6243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e34549183469
    • 766f973c47980f59be94a266979b6fb8e1dbfb093b8a91044c98cca07f47b608c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4e23b82c35130ad2d56ce8bc2a13accc8Local MyCPANFoo-Bar-1.23.tgzad3e5f671b1a0d8a166b0c47c064c829c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Foo-Bar-1.34.tgz9a0370ce4b8ebad611812b1c6750f83cc59010149f1675b8132698dd5126db20e23b82c35130ad2d56ce8bc2a13accc86801455ffe35cf1eaef66bbd6c7169abFoo-Bar-1.56.tgz766f973c47980f59be94a266979b6fb8c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Baz-1.04.tgze1dbfb093b8a91044c98cca07f47b608e23b82c35130ad2d56ce8bc2a13accc8Quack-0.01.tgz6243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e34549183469
    • 766f973c47980f59be94a266979b6fb8e1dbfb093b8a91044c98cca07f47b608c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4e23b82c35130ad2d56ce8bc2a13accc8Local MyCPANFoo-Bar-1.23.tgzad3e5f671b1a0d8a166b0c47c064c829c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Foo-Bar-1.34.tgz9a0370ce4b8ebad611812b1c6750f83cc59010149f1675b8132698dd5126db20e23b82c35130ad2d56ce8bc2a13accc86801455ffe35cf1eaef66bbd6c7169abFoo-Bar-1.56.tgz766f973c47980f59be94a266979b6fb8c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Baz-1.04.tgze1dbfb093b8a91044c98cca07f47b608e23b82c35130ad2d56ce8bc2a13accc8Quack-0.01.tgz6243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e34549183469
    • 766f973c47980f59be94a266979b6fb8e1dbfb093b8a91044c98cca07f47b608c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4e23b82c35130ad2d56ce8bc2a13accc8Local MyCPANFoo-Bar-1.56.tgz766f973c47980f59be94a266979b6fb8c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Baz-1.04.tgze1dbfb093b8a91044c98cca07f47b608e23b82c35130ad2d56ce8bc2a13accc8Quack-0.01.tgz6243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e34549183469
    • 766f973c47980f59be94a266979b6fb8e1dbfb093b8a91044c98cca07f47b608c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4e23b82c35130ad2d56ce8bc2a13accc8Local MyCPANFoo-Bar-1.56.tgz766f973c47980f59be94a266979b6fb8c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Baz-1.04.tgze1dbfb093b8a91044c98cca07f47b608e23b82c35130ad2d56ce8bc2a13accc8Quack-0.01.tgz6243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e34549183469
    • 766f973c47980f59be94a266979b6fb8e1dbfb093b8a91044c98cca07f47b608c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4e23b82c35130ad2d56ce8bc2a13accc8Local MyCPANFoo-Bar-1.56.tgz766f973c47980f59be94a266979b6fb8c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Baz-1.04.tgze1dbfb093b8a91044c98cca07f47b608e23b82c35130ad2d56ce8bc2a13accc8
    • Foo-Bar-1.56.tgz766f973c47980f59be94a266979b6fb8c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8Baz-1.04.tgze1dbfb093b8a91044c98cca07f47b608e23b82c35130ad2d56ce8bc2a13accc82a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f21ca973aae524b7017d672f5bc4a33d9b4Local MyCPAN
    • -2%200 of 10,000 files
    • Problem 2Dual-lived modulesoverwritecore modules
    • 766f973c47980f59be94a266979b6fb83c797302d2fc35fbc65df904eed812a7c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4a0da8cae6a473a9e87ddeb702509fc4dLocal MyCPANperl-5.12.1.tgzad3e5f671b1a0d8a166b0c47c064c829c59010149f1675b8132698dd5126db207ba16d8692b651f52984605198231657a0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.14.2.tgz9a0370ce4b8ebad611812b1c6750f83c2698ecc95aa4f7887656c5930082f81bc59010149f1675b8132698dd5126db203c797302d2fc35fbc65df904eed812a7a0da8cae6a473a9e87ddeb702509fc4dperl-5.16.1.tgz4d48c8f5c2ee07e53f6ac67e997cb5d6c59010149f1675b8132698dd5126db20500c7513b048905fe3cf2b440da56d0aa0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.19.0.tgzee56f162ef27e2dee9d039294d78df34b2bb5bc3b63895e7800e61e0af34f2976243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e34549183469
    • 766f973c47980f59be94a266979b6fb83c797302d2fc35fbc65df904eed812a7c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4a0da8cae6a473a9e87ddeb702509fc4dLocal MyCPANperl-5.12.1.tgzad3e5f671b1a0d8a166b0c47c064c829c59010149f1675b8132698dd5126db207ba16d8692b651f52984605198231657a0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.14.2.tgz9a0370ce4b8ebad611812b1c6750f83c2698ecc95aa4f7887656c5930082f81bc59010149f1675b8132698dd5126db203c797302d2fc35fbc65df904eed812a7a0da8cae6a473a9e87ddeb702509fc4dperl-5.16.1.tgz4d48c8f5c2ee07e53f6ac67e997cb5d6c59010149f1675b8132698dd5126db20500c7513b048905fe3cf2b440da56d0aa0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.19.0.tgzee56f162ef27e2dee9d039294d78df34b2bb5bc3b63895e7800e61e0af34f2976243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e345491834699f37118ef2781c6ada6560757b348bf683695e488c53b573e8289b4e2837047da4534d41a113c7aad16c45b1182cfc74cce79ad826b0a29748b2c3e43706a8662ee005e8b18fcc9c0b711fe8678f559dAlready removed
    • 766f973c47980f59be94a266979b6fb83c797302d2fc35fbc65df904eed812a7c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4a0da8cae6a473a9e87ddeb702509fc4dLocal MyCPANperl-5.12.1.tgzad3e5f671b1a0d8a166b0c47c064c829c59010149f1675b8132698dd5126db207ba16d8692b651f52984605198231657a0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.14.2.tgzcpan/CPAN/lib/CPAN.pmcpan/CPAN/lib/App/Cpan.pmcpan/CPAN-Meta/lib/CPAN/Meta.pm3c797302d2fc35fbc65df904eed812a7a0da8cae6a473a9e87ddeb702509fc4dperl-5.16.1.tgz4d48c8f5c2ee07e53f6ac67e997cb5d6c59010149f1675b8132698dd5126db20500c7513b048905fe3cf2b440da56d0aa0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.19.0.tgzee56f162ef27e2dee9d039294d78df34b2bb5bc3b63895e7800e61e0af34f2976243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e34549183469lib/CPAN.pmlib/App/Cpan.pmlib/CPAN/Meta.pmcce79ad826b0a29748b2c3e43706a8662ee005e8b18fcc9c0b711fe8678f559dAlready removed
    • 766f973c47980f59be94a266979b6fb83c797302d2fc35fbc65df904eed812a7c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4a0da8cae6a473a9e87ddeb702509fc4dLocal MyCPANperl-5.12.1.tgzad3e5f671b1a0d8a166b0c47c064c829c59010149f1675b8132698dd5126db207ba16d8692b651f52984605198231657a0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.14.2.tgz3c797302d2fc35fbc65df904eed812a7a0da8cae6a473a9e87ddeb702509fc4dperl-5.16.1.tgz4d48c8f5c2ee07e53f6ac67e997cb5d6c59010149f1675b8132698dd5126db20500c7513b048905fe3cf2b440da56d0aa0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.19.0.tgzee56f162ef27e2dee9d039294d78df34b2bb5bc3b63895e7800e61e0af34f2976243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e34549183469cce79ad826b0a29748b2c3e43706a8662ee005e8b18fcc9c0b711fe8678f559dAlready removed
    • 766f973c47980f59be94a266979b6fb83c797302d2fc35fbc65df904eed812a7c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4a0da8cae6a473a9e87ddeb702509fc4dLocal MyCPANperl-5.12.1.tgzad3e5f671b1a0d8a166b0c47c064c829c59010149f1675b8132698dd5126db207ba16d8692b651f52984605198231657a0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.14.2.tgz3c797302d2fc35fbc65df904eed812a7a0da8cae6a473a9e87ddeb702509fc4dperl-5.16.1.tgz4d48c8f5c2ee07e53f6ac67e997cb5d6c59010149f1675b8132698dd5126db20500c7513b048905fe3cf2b440da56d0aa0da8cae6a473a9e87ddeb702509fc4d3c797302d2fc35fbc65df904eed812a7perl-5.19.0.tgzee56f162ef27e2dee9d039294d78df34b2bb5bc3b63895e7800e61e0af34f2976243b4ec546826e5723bb9e2c30b611f4441a9f2017ea3f804d1e34549183469cce79ad826b0a29748b2c3e43706a8662ee005e8b18fcc9c0b711fe8678f559dAlready removed
    • 766f973c47980f59be94a266979b6fb83c797302d2fc35fbc65df904eed812a7c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4a0da8cae6a473a9e87ddeb702509fc4dLocal MyCPANperl-5.14.2.tgz3c797302d2fc35fbc65df904eed812a7a0da8cae6a473a9e87ddeb702509fc4dcce79ad826b0a29748b2c3e43706a8662ee005e8b18fcc9c0b711fe8678f559dAlready removed
    • Cheating•Look for Config.pm•Look at path for version directories•Choose from invoking Perl
    • -9%900 of 10,000 files
    • Problem 3Local editsinterfere withmatching
    • 112638334b169de2033f4b6e5efef11ce1dbfb093b8a91044c98cca07f47b608c59010149f1675b8132698dd5126db202a21ed7a3cbb58df1f5516840c108703c7af3f54ce42a74b7e728a6ee22a9f216801455ffe35cf1eaef66bbd6c7169abca973aae524b7017d672f5bc4a33d9b4e23b82c35130ad2d56ce8bc2a13accc8Local MyCPANFoo-Bar-1.23.tgzad3e5f671b1a0d8a166b0c47c064c829c59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8
    • lib/Foo/Bar.pme1dbfb093b8a91044c98cca07f47b608c59010149f1675b8132698dd5126db20lib/Baz/Bar.pmlib/Quux/Bar.pm6801455ffe35cf1eaef66bbd6c7169ablib/Quack.pme23b82c35130ad2d56ce8bc2a13accc8Local MyCPANFoo-Bar-1.23.tgzlib/Foo/Bar.pmc59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8
    • lib/Foo/Bar.pme1dbfb093b8a91044c98cca07f47b608c59010149f1675b8132698dd5126db20lib/Baz/Bar.pmlib/Quux/Bar.pm6801455ffe35cf1eaef66bbd6c7169ablib/Quack.pme23b82c35130ad2d56ce8bc2a13accc8Local MyCPANFoo-Bar-1.23.tgzlib/Foo/Bar.pmc59010149f1675b8132698dd5126db206801455ffe35cf1eaef66bbd6c7169abe23b82c35130ad2d56ce8bc2a13accc8
    • $ diff ~perl/lib/Foo/Bar.pm~BackPAN/.../Foo-Bar-1.23/lib/Foo/Bar.pm
    • Take thesmallestdiff
    • Create adistroprefsfile
    • -.1%10 of 10,000 files
    • Problem 4Private modulesarentindexed
    • UseMyCPAN::Indexerlocally
    • -.1%10 of 10,000 files
    • Problem 5Multiple releasescan existat the same time
    • So Far...
    • 87%8,700 of 10,000 files
    • What you can do
    • Try theStratoPAN.combeta
    • Send meyourdigestshttps://gist.github.com/briandfoy/5651608
    • References•MyCPAN::Indexer•MyCPAN::App::DPAN•BackPAN Archeology (http://yapc.tv/2008/ye/brian-backpan/)•http://www252.pair.com/comdog/