[Bast-commits] r4131 -
DBIx-Class-Fixtures/1.001/branches/includes/lib/DBIx/Class
captainL at dev.catalyst.perl.org
captainL at dev.catalyst.perl.org
Wed Mar 5 14:47:38 GMT 2008
Author: captainL
Date: 2008-03-05 14:47:38 +0000 (Wed, 05 Mar 2008)
New Revision: 4131
Modified:
DBIx-Class-Fixtures/1.001/branches/includes/lib/DBIx/Class/Fixtures.pm
Log:
fixed formatting
Modified: DBIx-Class-Fixtures/1.001/branches/includes/lib/DBIx/Class/Fixtures.pm
===================================================================
--- DBIx-Class-Fixtures/1.001/branches/includes/lib/DBIx/Class/Fixtures.pm 2008-03-05 14:42:44 UTC (rev 4130)
+++ DBIx-Class-Fixtures/1.001/branches/includes/lib/DBIx/Class/Fixtures.pm 2008-03-05 14:47:38 UTC (rev 4131)
@@ -409,36 +409,36 @@
my $config_file;
my $config;
if ($params->{config}) {
- #read config
+ #read config
$config_file = file($self->config_dir, $params->{config});
unless (-e $config_file) {
return DBIx::Class::Exception->throw('config does not exist at ' . $config_file);
}
$config = Config::Any::JSON->load($config_file);
- #process includes
- if ($config->{includes}) {
- $self->msg($config->{includes});
- unless (ref $config->{includes} eq 'ARRAY') {
- return DBIx::Class::Exception->throw('includes params of config must be an array ref of hashrefs');
- }
- foreach my $include_config (@{$config->{includes}}) {
- unless ((ref $include_config eq 'HASH') && $include_config->{file}) {
- return DBIx::Class::Exception->throw('includes params of config must be an array ref of hashrefs');
- }
-
- my $include_file = file($self->config_dir, $include_config->{file});
- unless (-e $include_file) {
- return DBIx::Class::Exception->throw('config does not exist at ' . $include_file);
- }
- my $include = Config::Any::JSON->load($include_file);
- $self->msg($include);
- $config = merge( $config, $include );
- }
- delete $config->{includes};
- }
-
- # validate config
+ #process includes
+ if ($config->{includes}) {
+ $self->msg($config->{includes});
+ unless (ref $config->{includes} eq 'ARRAY') {
+ return DBIx::Class::Exception->throw('includes params of config must be an array ref of hashrefs');
+ }
+ foreach my $include_config (@{$config->{includes}}) {
+ unless ((ref $include_config eq 'HASH') && $include_config->{file}) {
+ return DBIx::Class::Exception->throw('includes params of config must be an array ref of hashrefs');
+ }
+
+ my $include_file = file($self->config_dir, $include_config->{file});
+ unless (-e $include_file) {
+ return DBIx::Class::Exception->throw('config does not exist at ' . $include_file);
+ }
+ my $include = Config::Any::JSON->load($include_file);
+ $self->msg($include);
+ $config = merge( $config, $include );
+ }
+ delete $config->{includes};
+ }
+
+ # validate config
unless ($config && $config->{sets} && ref $config->{sets} eq 'ARRAY' && scalar(@{$config->{sets}})) {
return DBIx::Class::Exception->throw('config has no sets');
}
More information about the Bast-commits
mailing list