App-KGB

 view release on metacpan or  search on metacpan

lib/App/KGB/Change.pm  view on Meta::CPAN

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
It can take a hashref with keys all the field names (See L<|FIELDS>).
 
Or, it can take a single string, which is de-composed into components.
 
See L<|SYNOPSIS> for examples.
 
=cut
 
sub new {
    my $class = shift;
    my $self  = $class->SUPER::new();
 
    my $h = shift;
    if ( ref($h) ) {
        defined( $self->action( delete $h->{action} ) )
            or confess "'action' is required";
        defined( $self->path( delete $h->{path} ) )
            or confess "'path' is required";
        $self->prop_change( delete $h->{prop_change} );
    }
    else {

lib/App/KGB/Client.pm  view on Meta::CPAN

372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
        }
    );
 
See L<|FIELDS> above.
 
=cut
 
sub new {
    my ( $class, $init ) = @_;
 
    my $self = $class->SUPER::new(
        {   use_color => 1,
            %$init,
        }
    );
 
    print "Configuration: " . YAML::Dump(@_) if $self->verbose;
 
    defined( $self->repo_id )
        or confess "'repo_id' is mandatory";
    $self->br_mod_re( [ $self->br_mod_re // () ] )

lib/App/KGB/Client/CVS.pm  view on Meta::CPAN

94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
require v5.10.0;
use Carp qw(confess);
__PACKAGE__->mk_accessors(qw( _called author cvs_root directory ));
 
sub new {
    my $class = shift;
    my $self = $class->SUPER::new(@_);
    $self->_called(0);
 
    defined( $self->cvs_root )
        or confess "'cvs_root' is mandatory";
 
    return $self;
}
 
use Fcntl qw(:flock);

lib/App/KGB/Client/Fake.pm  view on Meta::CPAN

73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
require v5.10.0;
use Carp qw(confess);
use Digest::SHA qw(sha1_hex);
__PACKAGE__->mk_accessors(qw( _called ));
 
sub new {
    my $class = shift;
    my $self = $class->SUPER::new(@_);
    $self->_called(0);
 
    return $self;
}
 
sub describe_commit {
    my ($self) = @_;
 
    return undef if $self->_called;

lib/App/KGB/Client/Git.pm  view on Meta::CPAN

173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
If you don't like this, set it to false.
 
The default is C<true>.
 
=back
 
=cut
 
sub new {
    my $class = shift;
    my $self  = $class->SUPER::new(@_);
 
    $self->git_dir( $ENV{GIT_DIR} )
        unless defined( $self->git_dir );
 
    defined( $self->git_dir )
        or confess
        "'git_dir' is mandatory; either supply it or define GIT_DIR in the environment";
 
 
    $self->_git(

lib/App/KGB/Client/RelayMsg.pm  view on Meta::CPAN

76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
=cut
 
require v5.10.0;
use base 'App::KGB::Client';
use Carp qw(confess);
__PACKAGE__->mk_accessors(qw( relay_message));
 
sub new {
    my $class = shift;
    my $self = $class->SUPER::new(@_);
    defined( $self->relay_message ) or confess "relay_message is mandatory";
 
    return $self;
}
 
sub process {
    my $self = shift;
 
    my @servers = $self->shuffle_servers;

lib/App/KGB/Client/ServerRef.pm  view on Meta::CPAN

148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
 
__PACKAGE__->mk_accessors( qw( uri proxy password timeout verbose dry_run ) );
 
use utf8;
use Carp qw(confess);
use Digest::SHA qw(sha1_hex);
use YAML ();
 
sub new {
    my $self = shift->SUPER::new( @_ );
 
    defined( $self->uri )
        or confess "'uri' is mandatory";
    defined( $self->proxy )
        or $self->proxy( $self->uri . '?session=KGB' );
    defined( $self->password )
        or confess "'password' is mandatory";
 
    return $self;
}

lib/App/KGB/Client/Subversion.pm  view on Meta::CPAN

94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
use Carp qw(confess);
use SVN::Fs;
__PACKAGE__->mk_accessors(qw( _called repo_path revision ));
 
use constant rev_prefix => 'r';
 
sub new {
    my $class = shift;
    my $self = $class->SUPER::new(@_);
    $self->_called(0);
 
    defined( $self->repo_path )
        or confess "'repo_path' is mandatory";
 
    return $self;
}
 
sub describe_commit {
    my ($self) = @_;

lib/App/KGB/Commit.pm  view on Meta::CPAN

79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
=head1 CONSTRUCTOR
 
=head2 new ( { I<initial field values> } )
 
Standard constructor. Accepts a hashref with field values.
 
=cut
 
sub new {
    my $class = shift;
    my $self  = $class->SUPER::new(@_);
 
    not defined( $self->changes )
        or ref( $self->changes ) and ref( $self->changes ) eq 'ARRAY'
        or confess "'changes' must be an arrayref";
 
    my $log = $self->log;
    utf8::decode($log)
        or $log = "(log message is not valid UTF-8)"
        if defined($log);
    $self->log($log);

lib/App/KGB/Painter.pm  view on Meta::CPAN

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
B<color_codes> is a hash with the special symbols interpreted as coloring
commands by IRC clients.
 
B<item_colors> is another hash describing what colors to apply to different parts of
the messages.
 
=cut
 
sub new {
    my $self = shift->SUPER::new(@_);
 
    # default colors
    $self->color_codes( \%color_codes ) unless $self->color_codes;
    my $c = $self->color_codes;
    while ( my ($k,$v) = each %color_codes ) {
        $c->{$k} = $v unless exists $c->{$k};
    }
 
    # default styles
    $self->item_colors( \%item_colors ) unless $self->item_colors;



( run in 0.305 second using v1.01-cache-2.11-cpan-e5176c747c2 )