App-Task

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


### Changed
- Issue #2: Do system commands via line handler (Created Issue #10 to look into remaining STDERR issue)
- make header/footer stand out when possible

### Fixed
- Issue #3: POD: Add =encoding #3
- Issue #4: reconfig for github/github issues for metacpan
- Issue #5: correct dependencies
- Issue #6: `{ fatal => 1 }` does not work, prototype …
- Issue #7: POD: correct DESCRIPTION "verify foo" task should return false when the check fails
- Issue #8: Misc TIE fixups
- Issue #9: Get it to play nice w/ Git::Repository (System::Command)

## [0.01] - 2018-01-15
### Added
- Initial Release

lib/App/Task.pm  view on Meta::CPAN


Nothing wrong with that but it could be easier to process visually, so if we C<task()>’d it up a bit like this:

    task "setup foo" => sub {
        task "configure foo" => "…";
        task "run foo" => \&foo;
    };

    task "finalize foo" => sub {
        task "enable barring" => […,…];
        task "verify foo" => sub {
            my $status = test_foo();
            say $status ? "foo is good" : "foo is down";
            return $status;
        };
    };

Now you get:

    ➜➜➜➜ [1.1] setup foo …
        ➜➜➜➜ [2.1] configure foo …

lib/App/Task.pm  view on Meta::CPAN

         … done (run foo).

     … done (setup foo).

    ➜➜➜➜ [1.2] finalize foo …
        ➜➜➜➜ [2.1] enable barring …
            Ullamcorper eget nulla facilisi etiam dignissim diam.
            Maecenas volutpat blandit aliquam etiam erat velit scelerisque in dictum.
         … done (enable barring).

        ➜➜➜➜ [2.2] verify foo …
            foo is down
         … failed (verify foo).

     … done (finalize foo).

=head1 INTERFACE

Each variant has a pre/post heading and indented output.

=head2 task NAME => CODEREF

If CODEREF returns true the post heading will be “done”, if it returns false it will be “failed”.



( run in 0.445 second using v1.01-cache-2.11-cpan-73692580452 )