File Coverage

blib/lib/Module/Setup/Plugin/VC/SVN.pm
Criterion Covered Total %
statement 19 19 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 1 2 50.0
total 28 29 96.5


line stmt bran cond sub pod time code
1             package Module::Setup::Plugin::VC::SVN;
2 3     3   13 use strict;
  3         6  
  3         86  
3 3     3   11 use warnings;
  3         6  
  3         83  
4 3     3   11 use base 'Module::Setup::Plugin';
  3         4  
  3         213  
5              
6 3     3   14 use Module::Setup::Path::Dir;
  3         4  
  3         591  
7              
8             sub register {
9 3     3 0 4 my($self, ) = @_;
10 3         13 $self->add_trigger( after_setup_module_attribute => \&after_setup_module_attribute );
11             }
12              
13             sub after_setup_module_attribute {
14 7     7 1 118 my $self = shift;
15 7 100       26 if ($self->dialog("Subversion friendly? [Yn] ", 'y') =~ /[Yy]/) {
16 2         29 $self->distribute->dist_path->subdir($_)->mkpath for (qw/ trunk tags branches /);
17 2         200 $self->distribute->{dist_path} = Module::Setup::Path::Dir->new($self->distribute->dist_path, 'trunk');
18 2         11 $self->plugins_stash->{'VC::SVN'} = +{
19             is_subversion_friendly => 1,
20             };
21             }
22             }
23              
24             1;