21 my @opt = <<'=back' =~ /B<--(\S+)>/g;
27 =item B<--skipquestions!>
29 Only does the conversions that work without doubt.
35 We have plenty of records in quickaccess/distcontext that have
36 greenish=3 although they are not greenish anymore because there is a
39 Found a version C<.53b>.
41 Found a distro that contained UTF-8 in the name:
43 0000000 64 69 73 74 76 5b e2 80 8b 51 75 64 6f 2d e2 80 >distv[�..Qudo-�.<
44 0000020 8b 30 2e 30 31 5f 30 32 2d 5d 20 3d 3e 0a 20 64 >.0.01_02-] =>. d<
46 That's ZERO WIDTH SPACE, of course.
48 Found Spreadsheet::WriteExcel::WebPivot in
49 NATHANL/Spreadsheet-WriteExcel-WebPivot2.tar.gz which is
50 misinterpreted by all of metacpan and search and matrix as an early
51 version of Spreadsheet::WriteExcel. Since the module is released 2005
52 it's probably a good idea to keep this as the others did and let
53 history mull over it forever:(
55 Found C<makepp-1.50-cvs-070506>.
57 Found C<MegaDistro-0.02-5>, C<Konstrukt-0.5-beta6>, C<pfacter-1.13-1>,
58 C<Data-Dump-Streamer-2.05-36>, C<Data-Path-1.3.fix_missing_build_require>
64 use lib
"$FindBin::Bin/../lib";
70 use File
::Basename
qw(dirname);
71 use File
::Path
qw(mkpath);
76 use Hash
::Util
qw(lock_keys);
80 lock_keys
%Opt, map { /([^=|!]+)/ } @opt;
89 $SIG{INT
} = $SIG{TERM
} = sub { my $sig = shift; warn "Caught $sig\n"; $SIGNAL=1 };
92 use Time
::HiRes
qw(sleep time);
93 use CPAN
::Blame
::Config
::Cnntp
;
94 my($workdir,$cpan_home,$ext_src);
96 $workdir = File
::Spec
->catdir
97 ($CPAN::Blame
::Config
::Cnntp
::Config
->{solver_vardir
},
99 $cpan_home = $CPAN::Blame
::Config
::Cnntp
::Config
->{cpan_home
};
100 $ext_src = $CPAN::Blame
::Config
::Cnntp
::Config
->{ext_src
};
102 my $sldbi = DBI
->connect ("dbi:SQLite:dbname=$workdir/quickaccess.db"); # return a dbi handle
104 my $slsth = $sldbi->prepare("SELECT count(distv) from distcontext where dist is null");
106 my($slcnt) = $slsth->fetchrow_array();
107 warn "records without dist: $slcnt\n";
109 my $selsth = $sldbi->prepare("SELECT distv,yaml from distcontext where dist is null");
110 my $updsth = $sldbi->prepare("UPDATE distcontext set dist=? where distv=?");
113 my $dumper = Dumpvalue
->new(unctrl
=> "unctrl", quoteHighBit
=> 1);
114 REC
: while (my($distv,$yaml) = $selsth->fetchrow_array) {
115 my $y = YAML
::Syck
::Load
$yaml;
116 die "distv[$distv] has no dist???" unless $y->{dist
};
118 my $quest = "distv[$distv] =>\n dist[$y->{dist}] (Y/n/q) ?";
119 my $qquest = $dumper->stringify($quest);
121 if (substr($distv,0,length($y->{dist
})) eq $y->{dist
}
122 and substr($distv,length($y->{dist
})) =~ /^-[Vv]?\d+[\d\._]*$/
123 and substr($distv,-1) =~ /[0-9]/
129 if ($Opt{skipquestions
}) {
134 $ans = "y" if $ans =~ /^\s*$/;
136 $updsth->execute($y->{dist
}, $distv) or die "Could not update";
137 } elsif ($ans =~ /^q/i) {
147 # cperl-indent-level: 4