Ambrosia
view release on metacpan or search on metacpan
lib/Ambrosia/Config.pm view on Meta::CPAN
#In the file "test.pl"
use Ambrosia::Config;
use Foo;
BEGIN
{
instance Ambrosia::Config( myApplication => './foo.conf' );
};
Ambrosia::Config::assign 'myApplication';
#..............
say Foo::proc1();
#..............
#In the file "Foo.pm"
package Foo;
use Ambrosia::Config;
sub proc1
{
return config->ParamA;
}
package Dog;
use Moose;
has Name => (is => 'ro', isa => 'Str');
has Age => (is => 'ro', isa => 'Num');
has State => (is => 'ro', isa => 'Str');
sub make_noise {
my $self = shift;
say $self->name(), " says: ruff-ruff!";
}
__PACKAGE__->meta->make_immutable;
1;
( run in 0.926 second using v1.01-cache-2.11-cpan-364913b4093 )