polettix / App-Easer

Simplify writing (hierarchical) CLI applications in Perl
https://github.polettix.it/App-Easer
Other
9 stars 0 forks source link

Synopsis code doesn't reproduce example output #1

Closed djerius closed 2 years ago

djerius commented 2 years ago

Perl 5.28 App::Easer 0.010

Running the code in the Synopsis doesn't result in the expected output. I've put the code I've copied from the Synopsis here. Here are the results:

% perl example.pl
Hello, bar!
% perl example.pl --foo World
Hello, World!
% perl example.pl commands
Hello, bar!
% perl example.pl help
Hello, bar!

help and commands don't seem to work. The tudu example application seems to work fine.

djerius commented 2 years ago

Aha. It seems that one needs to add 'auto-leaves' => 0 to the configuration.

polettix commented 2 years ago

You're right, I forgot to update the SYNOPSIS after setting a different default for auto-leaves.

I'll think about releasing a new V1 with the correct message, although I'm actually working on V2 now.