#!/usr/bin/perl package My::Config; use Moose; with 'MooseX::SimpleConfig'; has filename => ( is => 'ro', isa => 'Str', required => 1, ); has '+configfile' => ( default => sub { my $self = shift; '/some/path/' . $self->filename . ".yaml"; }, lazy => 1, ); my $config = My::Config->new_with_config( filename => "config");