App-Slackeria

 view release on metacpan or  search on metacpan

bin/slackeria  view on Meta::CPAN

my ( @plugins, @projects );

our $VERSION = '0.12';

GetOptions(
	'h|help'        => sub { show_help(0) },
	'P|projects=s@' => sub { push( @projects, split( qr{,}, $_[1] ) ) },
	'p|plugins=s@'  => sub { push( @plugins, split( qr{,}, $_[1] ) ) },
	't|template=s' => \$template,
	'v|verbose'    => \$verbose,
	'V|version'    => sub { say "slackeria version ${VERSION}"; exit 0 },

) or show_help(1);

my $filename = shift or show_help(1);

sub show_help {
	my ($exit_status) = @_;

	say 'Usage: slackeria [-v] [-P projects] [-p plugins] [-t template] '
	  . '<outfile>';

	exit $exit_status;
}

if ( @projects == 0 ) {
	@projects = $conf->projects();
}
if ( @plugins == 0 ) {
	@plugins = $conf->plugins();

bin/slackeria  view on Meta::CPAN


for my $name (@plugins) {
	$plugin->load( $name, %{ $conf->get( 'config', $name ) } );
}

for my $p ( keys %{$project} ) {

	for my $name ( $plugin->list() ) {

		if ($verbose) {
			say "Running ${p}/${name}";
		}

		$project->{$p}->{$name}
		  = $plugin->run( $name, $conf->get( $p, $name ) );
	}
}

App::Slackeria::Output->write_out(
	data     => $project,
	filename => $filename,



( run in 0.698 second using v1.01-cache-2.11-cpan-a1f116cd669 )