I have an controller that has actions that are set up using chained. My chained root action is in my root controller, then my 'section' controller has a 'root' action chained from the root controller's 'root' action. I then have endpoint actions in the 'section' controller class that chain from the 'root' action in the same class:
package MyApp::Controller::Root;
sub root :Chained('/') PathPart('') CaptureArgs(0) {}
package MyApp::Controller::Section;
sub root :Chained('/root') PathPrefix CaptureArgs(0) {}
sub foo :Chained('root') PathPart Args(0) {}
How can I disable the all the actions in the 'section' package via a config file? What I have done so far is make the 'root' action in the section class Private and that seems to work, but how can I tell that the section is not available when I build by navigation? I can try uri_for_action and that returns undef, but that seems a bit messy and it does raise a warning that Catalyst cannot find the uri_for for the action.