Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Here is my version, takes bundle (or as cpanp names it, snapshot) file as argument
#!/usr/bin/perl -- use strict; use warnings; use CPANPLUS::Internals::Utils ; use DBI; Main( @ARGV ); exit( 0 ); sub Main { my @snaps = @_; my %U; my $db = CPANPLUS::Internals::Utils->_home_dir . '\.cpanplus\db.sq +l'; warn "db is $db snaps is @snaps "; my $dbh = DBI->connect( qq!dbi:SQLite:dbname=$db!, undef, undef, { RaiseError => 1, PrintError => 1, }, ); my $sth = $dbh->prepare( q! select path, package from module where + module = ? ! ); for my $file ( @snaps ){ open my($fh), '<', $file or die; while(<$fh>){ if(/=head1 CONTENTS/.. /=head1 CONFIGURATION/){ if( /^(\w\S+)\s/ ){ my $module = $1; $sth->execute($module ); my($a,$p) = $sth->fetchrow_array; next unless $p and $a; $a =~ s!^authors/id/!!; next if $p =~ /^perl-5\./; next if $p =~ /^perl-5\./; my $pp = $p; $pp =~ s/-\d.\d.+$//; ## libwwwperl $U{$pp}="$a/$p"; #~ perl-5.10.1.tar.gz #~ perl-5.11.1.tar.bz2 #~ perl-5.12.3.tar.bz2 #~ perl-5.13.9.tar.gz } } } close $fh; } undef $sth; undef $dbh; print "\n\nsystem qw[ cpanp -d \n"; print " $U{$_}\n" for sort keys %U; print "\n\n];\n"; } __END__ system qw[ cpanp -d ... G/GB/GBARR/libnet-1.22.tar.gz G/GA/GAAS/libwww-perl-6.02.tar.gz ];
I use cpanp -d to first download all the tarballs then later, offline, change -d to -i to install all the tarballs

In reply to Re^2: How to clean-up an autobundle so it's really "auto-installable" by Anonymous Monk
in thread How to clean-up an autobundle so it's really "auto-installable" by sundialsvc4

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (11)
    As of 2021-01-27 23:55 GMT
    Find Nodes?
      Voting Booth?