App-Changelord/lib/App/Changelord/Role/Changelog.pm

22 lines
408 B
Perl
Raw Normal View History

2022-07-25 15:21:03 +00:00
package App::Changelord::Role::Changelog;
use v5.36.0;
use Moo::Role;
use CLI::Osprey;
option source => (
is => 'ro',
format => 's',
doc => q{changelog yaml file. Defaults to the env variable $CHANGELOG, or 'CHANGELOG.yml'},
default => $ENV{CHANGELOG} || 'CHANGELOG.yml',
);
has changelog => ( is => 'lazy' );
sub _build_changelog($self) {
return YAML::LoadFile($self->source)
}
1;