| 1 |
#!/usr/bin/env perl |
| 2 |
|
| 3 |
use strict; |
| 4 |
use warnings; |
| 5 |
use FindBin '$Bin'; |
| 6 |
use lib "$Bin/../lib"; |
| 7 |
|
| 8 |
use File::Slurper qw(read_text); |
| 9 |
use Module::Path::More qw(module_path); |
| 10 |
#use Perl::OSType; |
| 11 |
use Perl::osnames; |
| 12 |
|
| 13 |
print "os in Perl::OSType not yet in Perl::osnames:\n"; |
| 14 |
my $ostype_src = read_text(module_path(module => "Perl::OSType")); |
| 15 |
my %ostype_os; |
| 16 |
for my $line (split /^/m, $ostype_src) { |
| 17 |
$line =~ /^\s+([\w-]+)\s+\w+\s*$/ or next; |
| 18 |
$ostype_os{$1} = 1; |
| 19 |
} |
| 20 |
if ($ENV{DEBUG}) { use DD; dd \%ostype_os } |
| 21 |
|
| 22 |
for my $os (sort keys %ostype_os) { |
| 23 |
print " $os\n" unless grep { $_->[0] eq $os } @$Perl::osnames::data; |
| 24 |
} |
| 25 |
print "\n"; |
| 26 |
|
| 27 |
print "os in Perl::osnames no longert in Perl::OSType:\n"; |
| 28 |
for my $rec (@$Perl::osnames::data) { |
| 29 |
next if $ostype_os{ $rec->[0] }; |
| 30 |
print " $rec->[0]"; |
| 31 |
print " (already tagged old)" if grep { $_ eq 'old' } @{$rec->[1]}; |
| 32 |
print "\n"; |
| 33 |
} |
| 34 |
print "\n"; |