reverting back to when tests pass. applying changes one by one to find what failed
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Dispatcher.pm
index 2254431..78bb5a3 100644 (file)
@@ -1,7 +1,6 @@
 package Catalyst::Dispatcher;
 
 use Moose;
-use Class::MOP ();
 
 use Catalyst::Exception;
 use Catalyst::Utils;
@@ -51,7 +50,7 @@ application based on the attributes you set.
 
 =head1 METHODS
 
-=head2 new
+=head2 new 
 
 Construct a new dispatcher.
 
@@ -60,7 +59,7 @@ Construct a new dispatcher.
 sub BUILD {
   my ($self, $params) = @_;
 
-  my $container =
+  my $container = 
     Catalyst::ActionContainer->new( { part => '/', actions => {} } );
 
   $self->_tree( Tree::Simple->new( $container, Tree::Simple->ROOT ) );
@@ -137,7 +136,7 @@ sub forward {
     }
 
     my @args;
-
+    
     if ( ref( $extra_params[-1] ) eq 'ARRAY' ) {
         @args = @{ pop @extra_params }
     } else {
@@ -303,11 +302,11 @@ sub get_action {
     return $self->_action_hash->{"$namespace/$name"};
 }
 
-=head2 $self->get_action_by_path( $path );
-
-Returns the named action by its full path.
+=head2 $self->get_action_by_path( $path ); 
+   
+Returns the named action by its full path. 
 
-=cut
+=cut 
 
 sub get_action_by_path {
     my ( $self, $path ) = @_;
@@ -395,7 +394,7 @@ sub register {
         next if $key eq 'Private';
         my $class = "Catalyst::DispatchType::$key";
         unless ( $registered->{$class} ) {
-            eval { Class::MOP::load_class($class) };
+            eval "require $class";
             push( @{ $self->_dispatch_types }, $class->new ) unless $@;
             $registered->{$class} = 1;
         }
@@ -513,7 +512,7 @@ sub _load_dispatch_types {
     for my $type (@types) {
         my $class =
           ( $type =~ /^\+(.*)$/ ) ? $1 : "Catalyst::DispatchType::${type}";
-        eval { Class::MOP::load_class($class) };
+        eval "require $class";
         Catalyst::Exception->throw( message => qq/Couldn't load "$class"/ )
           if $@;
         push @{ $self->_dispatch_types }, $class->new;