title: Catalyst: global init action
body: <p>In Catalyst framework there is a global <code>init</code> sub(executed before any controller). i want the set some <code>config</code> variable from DB(like supper admin <code>id</code> or admin email for GPG configuration ).</p>
  
  <p>i tried to use <code>auto</code> and 'begin' actions but those actions are just executed for its corresponding controller.</p>
  
  <p>in <code>Root.pm</code> file:</p>
  
  <pre><code>sub auto :Private {
      my ($self, $c) = @_;
  
      my $config = $c-&gt;model('DB')-&gt;resultset('Config')-&gt;single();
      $c-&gt;config-&gt;{var1} = $config-&gt;var1;
  
  };
  </code></pre>
  
  <p>When i request another controller like <code>Controller2</code> and <code>begin</code> , the <code>$c-&gt;config-&gt;{var1}</code> was empty..</p>