Veli-Pekka Tätilä wrote:
>
> That will do fine for my basic needs, thanks for the idea. Now the problem
> is how do I wrap PPM so that I can both read from and write to it?
Why not just modify this code in ppm3-bin starting around line 3109 :
--------------------------------------------------------------------------
if ($upgrade) {
my @k = keys %$p;
my $ask = (@updates > 1 or @k > 1 and [EMAIL PROTECTED]);
if ($ask) {
# Which one do they want to install?
$o->inform(<<MANY);
Note: $pkg version $default->{oldver} is available from more than one place.
Which repository would you like to upgrade from?
MANY
my @repos = map { $_->[2] } @updates;
$o->print_pairs([ 1 .. @repos ], [EMAIL PROTECTED], '. ');
$o->inform("\n");
-----------------------------------
# You could just replace the code line below with : my $rep = 1;
# That would pick up the first rep that had it or you could do something
# more sophisticated if you had other choices..
-----------------------------------
my $rep = $o->prompt(
"Repository? [$default->{repo}] ",
$default->{repo},
[ 1 .. @repos, @repos ],
);
$rep = $repos[$rep - 1] if $rep =~ /^\d+$/;
$default = $p->{$rep};
}
--------------------------------------------------------------------------
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs