App-Dothe
view release on metacpan or search on metacpan
README.mkdn view on Meta::CPAN
```
deploy:
deps: [ clean, build, test ]
cmds:
- dzil release
```
#### `sources`
Array of files. Can take glob patterns that will be expanded using
[Path::Tiny::Glob](https://metacpan.org/pod/Path::Tiny::Glob). The result is accessible via the `sources` variable.
```
foo:
sources: [ './lib/**/*.pm' ]
foreach: sources
cmds:
- perl -c {{$item}}
```
#### `generates`
Array of files. If `sources` and `generates` are both given, the task will
only be run if any of the sources (or the `Dothe.yml` file itself) has been
modified after the `generates` files.
Can take glob patterns that will be expanded using
[Path::Tiny::Glob](https://metacpan.org/pod/Path::Tiny::Glob). The result is accessible via the `generates` variable.
#### `foreach`
Takes the name of a variable that must hold an array. If presents,
the `cmds` will be run for each value of that variable, which will
be accessible via `$item`.
#### `cmds`
lib/App/Dothe.pm view on Meta::CPAN
of dependencies (via L<Graph::Directed>) and run them in their
topological order.
deploy:
deps: [ clean, build, test ]
cmds:
- dzil release
=head4 C<sources>
Array of files. Can take glob patterns that will be expanded using
L<Path::Tiny::Glob>. The result is accessible via the C<sources> variable.
foo:
sources: [ './lib/**/*.pm' ]
foreach: sources
cmds:
- perl -c {{$item}}
=head4 C<generates>
Array of files. If C<sources> and C<generates> are both given, the task will
only be run if any of the sources (or the F<Dothe.yml> file itself) has been
modified after the C<generates> files.
Can take glob patterns that will be expanded using
L<Path::Tiny::Glob>. The result is accessible via the C<generates> variable.
=head4 C<foreach>
Takes the name of a variable that must hold an array. If presents,
the C<cmds> will be run for each value of that variable, which will
be accessible via C<$item>.
=head4 C<cmds>
lib/App/Dothe/Task.pm view on Meta::CPAN
is => 'ro',
init_arg => 'generates',
default => sub { [] },
);
has sources => (
is => 'ro',
init_arg => undef,
lazy => 1,
default => sub($self) {
$self->vars->{sources} = $self->expand_files( $self->raw_sources )
},
);
has generates => (
is => 'ro',
init_arg => undef,
lazy => 1,
default => sub ($self){
$self->vars->{generates} = $self->expand_files( $self->raw_generates )
},
);
sub expand_files($self, $list ) {
$list = [ $list ] unless ref $list;
[
map { File::Wildcard->new( path=> $_ )->all }
map { s!\*\*!/!gr }
map { $self->render( $_, $self->vars ) }
@$list ]
}
( run in 2.063 seconds using v1.01-cache-2.11-cpan-97f6503c9c8 )