From 615cc0f5815e93745e8cf62eee154f33bab229f2 Mon Sep 17 00:00:00 2001 From: Yanick Champoux Date: Mon, 25 Jul 2022 11:34:24 -0400 Subject: [PATCH] doc for ::Add --- lib/App/Changelord/Command/Add.pm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/App/Changelord/Command/Add.pm b/lib/App/Changelord/Command/Add.pm index 9074fb7..1fd3209 100644 --- a/lib/App/Changelord/Command/Add.pm +++ b/lib/App/Changelord/Command/Add.pm @@ -3,15 +3,17 @@ package App::Changelord::Command::Add; use 5.36.0; use Moo; -use CLI::Osprey desc => 'add a change to the changelog'; +use CLI::Osprey + desc => 'add a change to the NEXT release', + description_pod => <<'END'; +Add a change entry to the NEXT release. +END use PerlX::Maybe; use Path::Tiny; use App::Changelord::Command::Init; -has changelog => ( is => 'lazy' ); - -sub _build_changelog ($self) { $self->parent_command->changelog } +with 'App::Changelord::Role::Changelog'; # TODO validate the type option type => ( @@ -48,7 +50,7 @@ sub next_release($self) { } sub save_changelog($self) { - my $src = $self->parent_command->source; + my $src = $self->source; path($src)->spew( App::Changelord::Command::Init::serialize_changelog($self) ); } @@ -63,6 +65,8 @@ sub run ($self) { }; $self->save_changelog; + + say "change added to the changelog"; } 'end of App::Changelog::Command::Add';