--- lib/A3C/Dispatcher.pm 2008/06/16 22:17:06 185 +++ lib/A3C/Dispatcher.pm 2008/06/16 22:56:14 186 @@ -43,4 +43,20 @@ }; +sub first_instance { + my $selection = A3C::Model::StrixInstanceSelectionCollection->new; + $selection->unlimit; + my $instance = $selection->first->instance->instance; + warn "# using default instance $instance"; + return $instance; +} + +before '/strix/' => run { + + if ( ! get('instance') ) { + set 'instance' => first_instance; + } + +}; + 1;