Changeset 22044 for lang/perl/Module-Setup
- Timestamp:
- 10/24/08 18:08:00 (5 years ago)
- Location:
- lang/perl/Module-Setup/trunk/lib/Module/Setup/Flavor
- Files:
-
- 1 added
- 2 modified
-
Default.pm (modified) (1 diff)
-
PBP.pm (modified) (1 diff)
-
SelectVC.pm (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Module-Setup/trunk/lib/Module/Setup/Flavor/Default.pm
r22032 r22044 2 2 use strict; 3 3 use warnings; 4 use base 'Module::Setup::Flavor'; 5 6 7 sub setup_config { 8 my($self, $context, $config) = @_; 9 10 my %vcs = ( 11 SVN => 'VC::SVN', 12 SVK => 'VC::SVK', 13 Git => 'VC::Git', 14 ); 15 16 for my $name (qw/ SVN SVK Git /) { 17 my $pkg = $vcs{$name}; 18 next unless $context->dialog("Do you use $name? [yN]", 'n') =~ /[Yy]/; 19 $context->log("You chose version control system: $name"); 20 21 next if grep { 22 ( ref($_) eq 'HASH' && $_->{module} eq $pkg) || $_ eq $pkg 23 } @{ $config->{plugins} }; 24 25 push @{ $config->{plugins} }, $pkg; 26 } 27 28 if(grep { 29 ( ref($_) eq 'HASH' && $_->{module} eq 'VC::SVK') || $_ eq 'VC::SVK' 30 } @{ $config->{plugins} }) { 31 my @plugins = grep { 32 !(( ref($_) eq 'HASH' && $_->{module} eq 'VC::SVN') || $_ eq 'VC::SVN') 33 } @{ $config->{plugins} }; 34 $config->{plugins} = \@plugins; 35 } 36 37 } 4 use base 'Module::Setup::Flavor::SelectVC'; 38 5 39 6 1; -
lang/perl/Module-Setup/trunk/lib/Module/Setup/Flavor/PBP.pm
r22032 r22044 2 2 use strict; 3 3 use warnings; 4 use base 'Module::Setup::Flavor'; 5 6 sub setup_config { 7 my($class, $context, $config) = @_; 8 9 my %vcs = ( 10 SVN => 'VC::SVN', 11 SVK => 'VC::SVK', 12 Git => 'VC::Git', 13 ); 14 15 for my $name (qw/ SVN SVK Git /) { 16 my $pkg = $vcs{$name}; 17 next unless $context->dialog("Do you use $name? [yN]", 'n') =~ /[Yy]/; 18 $context->log("You chose version control system: $name"); 19 20 next if grep { 21 ( ref($_) eq 'HASH' && $_->{module} eq $pkg) || $_ eq $pkg 22 } @{ $config->{plugins} }; 23 24 push @{ $config->{plugins} }, $pkg; 25 } 26 27 if(grep { 28 ( ref($_) eq 'HASH' && $_->{module} eq 'VC::SVK') || $_ eq 'VC::SVK' 29 } @{ $config->{plugins} }) { 30 my @plugins = grep { 31 !(( ref($_) eq 'HASH' && $_->{module} eq 'VC::SVN') || $_ eq 'VC::SVN') 32 } @{ $config->{plugins} }; 33 $config->{plugins} = \@plugins; 34 } 35 36 } 4 use base 'Module::Setup::Flavor::SelectVC'; 37 5 38 6 1;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)