Analizo
view release on metacpan or search on metacpan
lib/Analizo/Batch/Directories.pm view on Meta::CPAN
2345678910111213141516171819202122use
strict;
use
warnings;
__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
101112131415161718192021222324252627282930use
YAML::XS;
__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
1234567891011121314151617package
Analizo::Batch::Job::Directories;
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
34567891011121314151617181920212223use
Cwd;
use
File::Spec;
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
67891011121314151617181920212223242526$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
3839404142434445464748495051525354555657
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) {
$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 )