Analizo

 view release on metacpan or  search on metacpan

lib/Analizo/Batch/Directories.pm  view on Meta::CPAN

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use strict;
 
use parent qw(https://metacpan.org/pod/Analizo::Batch">Analizo::Batch Class::Accessor::Fast);
 
__PACKAGE__->mk_accessors(qw(directories));
 
sub new {
  my ($class, @directories) = @_;
  my $self = $class->SUPER::new;
  if (@directories < 1) {
    @directories = glob('*');
  }
  @directories = grep { -d $_ } @directories;
  $self->directories(\@directories);
  $self->{index} = 0;
  return $self;
}
 
sub fetch_next {

lib/Analizo/Batch/Git.pm  view on Meta::CPAN

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use Cwd 'abs_path';
 
__PACKAGE__->mk_ro_accessors(qw( directory ));
 
sub new {
  my ($class, $directory) = @_;
  $directory ||= '.';
  $directory = abs_path($directory);
  $class->SUPER::new(directory => $directory);
}
 
sub fetch_next {
  my ($self) = @_;
  $self->initialize();
  my $nextcommit = $self->{relevant}->[$self->{index}];
  if ($nextcommit) {
    $self->{index}++;
    return $nextcommit;
  } else {

lib/Analizo/Batch/Job/Directories.pm  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
use parent qw( https://metacpan.org/pod/Analizo::Batch::Job">Analizo::Batch::Job Class::Accessor::Fast );
use Cwd;
 
sub new {
  my ($class, $directory) = @_;
  $class->SUPER::new(id => $directory, directory => $directory);
}
 
__PACKAGE__->mk_accessors(qw(oldcwd));
 
sub prepare {
  my ($self) = @_;
  $self->oldcwd(getcwd);
  chdir($self->directory);
}

lib/Analizo/Batch/Job/Git.pm  view on Meta::CPAN

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use Cwd;
use Cwd 'abs_path';
use Digest::SHA qw/ sha1_hex /;
use File::Copy::Recursive qw(dircopy);
use File::Path qw(remove_tree);
 
sub new {
  my ($class, $directory, $id, $data) = @_;
  $class->SUPER::new(directory => $directory, actual_directory => $directory, id => $id, data => $data);
}
 
sub batch($$) {
  my ($self, $batch) = @_;
  if ($batch) {
    $self->{finder} = sub { $batch->find($_[0]); };
    $batch->share_filters_with($self);
  }
  return undef;
}

lib/Analizo/Batch/Runner/Parallel.pm  view on Meta::CPAN

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use parent qw( https://metacpan.org/pod/Analizo::Batch::Runner">Analizo::Batch::Runner );
 
$YAML::XS::LoadBlessed = 1;
$YAML::XS::LoadCode = 1;
$YAML::XS::DumpCode = 1;
 
sub new {
  my ($class, $parallelism) = @_;
  $parallelism ||= 2;
  $class->SUPER::new(parallelism => $parallelism);
}
 
sub parallelism {
  my ($self) = @_;
  return $self->{parallelism};
}
 
sub actually_run {
  my ($self, $batch, $output) = @_;
  $self->start_workers();

lib/Analizo/Command/help.pm  view on Meta::CPAN

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
    exit 0;
  }
  elsif ($self->app->global_options->help || (@ARGV && $ARGV[0] eq '--help')) {
    $self->show_manpage('Analizo', 'analizo');
    exit 0;
  }
  elsif ($self->app->global_options->usage) {
    print $self->app->usage;
    exit 0;
  }
  $self->SUPER::execute($opt, $args);
}
 
1;
 
=head1 COPYRIGHT AND AUTHORS
 
See B<analizo(1)>.
 
=cut



( run in 0.262 second using v1.01-cache-2.11-cpan-94b05bcf43c )