Re: FYR: modulereport
[email protected] (Janek Schleicher) Tue, 04 Jun 2002 20:55:14 +0200
| Newsgroups | perl.scripts |
|---|---|
| Message-ID | <[email protected]> |
Scott R. Godin wrote at Tue, 04 Jun 2002 19:24:05 +0200: In article <[email protected]> wrote "Scott R. Godin" <[email protected]>: > comments welcome, but the webdragon.net addresses are currently down. re-hosting elsewhere > shortly. apologies. > > -=- > > ... > USE_SAVEFILE => exists($opts{'f'}) ? 1 : 0; > > my $savefile = File::Spec->catfile( > File::Spec->curdir(), > defined($opts{'f'}) ? $opts{'f'} : 'ModuleCheck.txt' $opts{f} ||= 'ModuleCheck.txt'; > ); > > ... > > Installed Module Ins Version CPAN Version EOF > my $fullbar = "-" x 80; > foreach (sort {uc($a) cmp uc($b)} keys %{$ref}) > { > /^(\w+)\:{0,2}.*$/; > my $this = $1;# current module primary tree > my $bar = ""; > # insert a separator if the primary module tree changed ;-) > $bar = $fullbar if ($last ne $this); > my($ver, $cp) = ($ref->{$_}[0], $ref->{$_}[1]); my ($ver, $cp) = @{$ref->{$_}}; >.... > my $t = ""; > if ($ver && $cp) {# if both are valid strings (not "" ) > no warnings "numeric"; > # some authors use 1.00_00, which is fine except in strings =:P # Perl will coerce the > value, but the warning is still annoying $t = 0 + $ver < 0 + $cp ? "<" : ""; # show us if > we're out of date > } > if (($ver || $cp) && !($ver && $cp)) { ($ver xor $cp) Couldn't find real bugs ;-) Greetings, Janek