summaryrefslogtreecommitdiff
blob: 2ace064543ed47a832460c316822d16496ebbf25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{

  package VirtualRecord;
  use 5.16.0;
  use Moo;

  has virtual_name         => ( is => rw =>, required => 1, );
  has virtual_corepackage  => ( is => rw =>, required => 1, );
  has virtual_check_module => ( is => rw =>, required => 1, );
  has repo                 => ( is => rw =>, required => 1, );


}
{
  package VDB;
  use 5.16.0;
  use Quote::Sub;
  has items => ( is => rw => , default => quote_sub(q{ [] });

  sub add_item {
    my ( $self ,  @args ) = @_ ;
    my $rec =  VirtualRecord->new(
        virtual_name => $args[0],
        virtual_corepackage => $args[1],
        virtual_check_moodule => $args[2],
        repo => $args[3];
    );
    push @{ $self->items }, $rec;
  }
  sub add_items {
    my ( $self, @args ) = @_;
    for my $rec ( @args ){ 
      $self->add_item( @{$rec} );
    }
  }
}

sub atom_expand {
  my $atom = shift;
  my $package = $atom =~ s/::/-/gr;
  my $virtual = $package =~ s/^/perl-/r;
  return ( $virtual, $package, $atom );
}
my $vdb = VDB->new();
$vdb->add_items(
  ( map { [ atom_expand($_), 'perl-experimental' ] } qw(
      Archive::Extract
      B::Debug
      B::Lint
      constant
      CPAN
      CPANPLUS
      CPANPLUS::Dist::Build
      Devel::DProf
      Devel::PPPort
      Devel::SelfStubber
      Dumpvalue
      Exporter
      ExtUtils::MakeMaker
      File::Fetch
      Filter::Simple
      HTTP::Tiny
      if
      IPC::SysV
      Log::Message
      Log::Message::Simple
      Math::Complex
      Module::CoreList
      NEXT
      Object::Accessor
      Pod::LaTeX
      Pod::Perldoc
      Pod::Plainer
      SelfLoader
      Term::UI
      Unicode::Collate
      Unicode::Normalize
  )),
  [ 'perl-i18n-langtags' , 'i18n-langtags', 'I18N::LangTags' , 'perl-experimental']
);
$vdb->add_items(
  ( map { [ atom_expand($_), 'gentoo' ] } qw(
      Archive::Tar
      Attribute::Handlers
      AutoLoader
      CGI
      Class::ISA
      Compress::Raw::Bzip2
      Compress::Raw::Zlib
      CPAN::Meta
      CPAN::Meta::Requirements
      CPAN::Meta::YAML
      Data::Dumper
      DB_File
  )),
  [ 'perl-digest-base' , 'digest-base', 'Digest' , 'gentoo'],
 ( map { [ atom_expand($_), 'gentoo' ] } qw(
  )),

);