Apply method modifier to capture $ctx for ctx_request to the tested app, not Catalyst...
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Test.pm
index f18029a..10d16ca 100644 (file)
@@ -31,7 +31,7 @@ my $build_exports = sub {
     my $get = sub { $request->(@_)->content };
 
     my $ctx_request = sub {
-        my $me      = ref $self || $self;
+        my $me = ref $self || $self;
 
         ### throw an exception if ctx_request is being used against a remote
         ### server
@@ -49,7 +49,7 @@ my $build_exports = sub {
         ### hook into 'dispatch' -- the function gets called after all plugins
         ### have done their work, and it's an easy place to capture $c.
 
-        my $meta = Catalyst->meta;
+        my $meta = $class->meta;
         $meta->make_mutable;
         $meta->add_after_method_modifier( "dispatch", sub {
             $c = shift;
@@ -339,7 +339,7 @@ Catalyst Contributors, see Catalyst.pm
 
 =head1 COPYRIGHT
 
-This program is free software, you can redistribute it and/or modify it under
+This library is free software. You can redistribute it and/or modify it under
 the same terms as Perl itself.
 
 =cut