docs for ::Init

This commit is contained in:
Yanick Champoux 2022-07-25 11:55:42 -04:00
parent 0fa5f2a9a4
commit 3b4c019dcc

View File

@ -12,13 +12,9 @@ use List::AllUtils qw/ first min uniq /;
use Version::Dotted::Semantic;
with 'App::Changelord::Role::ChangeTypes';
has changelog => ( is => 'lazy' );
with 'App::Changelord::Role::Changelog';
with 'App::Changelord::Role::Versions';
sub _build_changelog ($self) { $self->parent_command->changelog }
sub serialize_changelog($self, $changelog = undef) {
$changelog //= $self->changelog;
@ -42,7 +38,7 @@ sub serialize_changelog($self, $changelog = undef) {
}
sub run ($self) {
my $src = $self->parent_command->source;
my $src = $self->source;
die "file '$src' already exists, aborting\n" if -f $src;
my $change = {
@ -51,7 +47,7 @@ sub run ($self) {
homepage => undef,
with_stats => 'true',
ticket_url => undef,
commit_regex => /^(?<type>[^: ]+):(?<desc>.*?)(\[(?<ticket>[^\]]+)\])?$/,
commit_regex => q/^(?<type>[^: ]+):(?<desc>.*?)(\[(?<ticket>[^\]]+)\])?$/,
},
change_types => $self->change_types,
releases => [