line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Module::Setup::Plugin::VC::Bazaar;
|
2
|
1
|
|
|
1
|
|
6
|
use strict;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings;
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
4
|
1
|
|
|
1
|
|
5
|
use base 'Module::Setup::Plugin';
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
972
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.03';
|
7
|
|
|
|
|
|
|
# this code is variation of Module::Setup::Plugin::VC::Git for VC::Bazaar. thx.
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub register
|
10
|
|
|
|
|
|
|
{
|
11
|
0
|
|
|
0
|
0
|
|
my $self = shift;
|
12
|
0
|
|
|
|
|
|
$self->add_trigger( check_skeleton_directory => \&check_skeleton_directory );
|
13
|
0
|
|
|
0
|
|
|
$self->add_trigger( append_template_file => sub { $self->append_template_file(@_) } );
|
|
0
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
}
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub check_skeleton_directory
|
17
|
|
|
|
|
|
|
{
|
18
|
0
|
|
|
0
|
1
|
|
my $self = shift;
|
19
|
0
|
0
|
|
|
|
|
return unless $self->dialog("Bzr init? [Yn] ", 'y') =~ /[Yy]/;
|
20
|
|
|
|
|
|
|
|
21
|
0
|
0
|
|
|
|
|
!$self->system(qw/bzr init/) or die $?;
|
22
|
0
|
0
|
|
|
|
|
!$self->system(qw/bzr add/) or die $?;
|
23
|
|
|
|
|
|
|
|
24
|
0
|
0
|
|
|
|
|
!$self->system(qw/bzr commit -m/, 'initial commit') or die $?;
|
25
|
|
|
|
|
|
|
}
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1;
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Module::Setup::Plugin::VC::Bazaar - Bazaar plugin
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
module-setup --init --plugin=VC::Bazaar
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 AUTHOR
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
turugina Eturugina {at} cpan.orgE
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SEE ALSO
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
L
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 LICENSE
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify
|
48
|
|
|
|
|
|
|
it under the same terms as Perl itself.
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=cut
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
__DATA__
|