in reply to Re^2: Favorite MooseX Modules?
in thread Favorite MooseX Modules?

Too add to what phaylon said ...

I recommend looking closer at the SYNOPSIS for this module. It does not make &new magical (this is something we strongly discourage in Moose, &new should behave consistently across all classes), instead it provides an alternate constructor called &new_with_config, which expects the path of a config file, like so ...

my $app = My::App->new_with_config(configfile => '/etc/my_app.yaml');
This module also integrates with MooseX::Getopt such that the usual &new_with_options constructor that MooseX::Getopt supplies will accept and do the right thing for the -configfile option.

MooseX::SimpleConfig is a Config::Any powered extension of MooseX::ConfigFromFile, which provides the basic building blocks. It is actually a rather simple setup, a quick read of the source of both these modules should tell you exactly what is going on.

-stvn