#!/usr/bin/perl package My::Config; use Moose; with 'MooseX::SimpleConfig'; sub new_from_config_shortname { my ($class, $filename) = @_; $class->new_from_config( configfile => '/some/path/' . $filename . ".yaml" ); } my $config = My::Config->new_from_config_shortname("config");