App-KGB
view release on metacpan or search on metacpan
lib/App/KGB/Change.pm view on Meta::CPAN
102103104105106107108109110111112113114115116117118119120121122It 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
372373374375376377378379380381382383384385386387388389390391392
}
);
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
949596979899100101102103104105106107108109110111112113require
v5.10.0;
use
App::KGB::Change;
use
App::KGB::Commit;
__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
;
}
lib/App/KGB/Client/Fake.pm view on Meta::CPAN
7374757677787980818283848586878889909192require
v5.10.0;
use
App::KGB::Change;
use
App::KGB::Commit;
__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
173174175176177178179180181182183184185186187188189190191192193If 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
7677787980818283848586878889909192939495=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
148149150151152153154155156157158159160161162163164165166167168__PACKAGE__->mk_accessors(
qw( uri proxy password timeout verbose dry_run )
);
use
utf8;
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
949596979899100101102103104105106107108109110111112113114use
SVN::Core;
use
SVN::Fs;
use
SVN::Repos;
__PACKAGE__->mk_accessors(
qw( _called repo_path revision )
);
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
798081828384858687888990919293949596979899=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
686970717273747576777879808182838485868788B<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 )