Author: spadkins
Date: Wed Oct 28 11:23:07 2009
New Revision: 13449

Modified:
   p5ee/trunk/App-Context/lib/App/Context.pm

Log:
fiddled with what needs to come before we check for deprecation

Modified: p5ee/trunk/App-Context/lib/App/Context.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Context.pm   (original)
+++ p5ee/trunk/App-Context/lib/App/Context.pm   Wed Oct 28 11:23:07 2009
@@ -559,6 +559,7 @@
     $service_conf = $conf->{$type}{$name};
     my $temporary = ($name eq "temporary") || $args->{temporary};
     my $service_initialized = ($service && ref($service) ne "HASH");
+print "$type($name): SERVICE=$service INIT=$service_initialized\n";
 
     ##############################################################
     # Load extra conf on demand
@@ -576,6 +577,30 @@
     }
 
     ##############################################################
+    # conf includes
+    ##############################################################
+    if (!$service_initialized && $service_conf && $service_conf->{include}) {
+        my $prefix = $options->{prefix};
+        my (@include_files);
+        my $include_files = $service_conf->{include};
+        if (ref($include_files) eq "ARRAY") {
+            @include_files = @$include_files;
+        }
+        elsif (ref($include_files) eq "") {
+            @include_files = ( $include_files );
+        }
+        foreach my $conf_file (@include_files) {
+            $conf_file = "$prefix/etc/app/$conf_file" if ($conf_file !~ m!^/!);
+            next if ($self->{conf_included}{$conf_file});
+            if (-r $conf_file) {
+                my $aux_conf = App::Conf::File->create({ conf_file => 
$conf_file });
+                $conf->overlay($aux_conf);
+            }
+            $self->{conf_included}{$conf_file} = 1;
+        }
+    }
+
+    ##############################################################
     # Detect Deprecated Services
     ##############################################################
     if (!$service_initialized && $service_conf) {
@@ -614,30 +639,6 @@
         }
     }
 
-    ##############################################################
-    # conf includes
-    ##############################################################
-    if (!$service_initialized && $service_conf && $service_conf->{include}) {
-        my $prefix = $options->{prefix};
-        my (@include_files);
-        my $include_files = $service_conf->{include};
-        if (ref($include_files) eq "ARRAY") {
-            @include_files = @$include_files;
-        }
-        elsif (ref($include_files) eq "") {
-            @include_files = ( $include_files );
-        }
-        foreach my $conf_file (@include_files) {
-            $conf_file = "$prefix/etc/app/$conf_file" if ($conf_file !~ m!^/!);
-            next if ($self->{conf_included}{$conf_file});
-            if (-r $conf_file) {
-                my $aux_conf = App::Conf::File->create({ conf_file => 
$conf_file });
-                $conf->overlay($aux_conf);
-            }
-            $self->{conf_included}{$conf_file} = 1;
-        }
-    }
-
     $new_service = 0;
 
     #   NEVER DEFINED     OR   NON-BLESSED HASH (fully defined services are 
blessed into classes)

Reply via email to