rename crequest to ctx_request on request of #cat-dev
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Test.pm
index d6f80c5..db79ba6 100644 (file)
@@ -20,7 +20,7 @@ Catalyst::Test - Test Catalyst Applications
     use Catalyst::Test 'TestApp';
     my $content  = get('index.html');           # Content as string
     my $response = request('index.html');       # HTTP::Response object
-    my($res, $c) = crequest('index.html');      # HTTP::Response & context object
+    my($res, $c) = ctx_request('index.html');   # HTTP::Response & context object
 
     use HTTP::Request::Common;
     my $response = request POST '/foo', [
@@ -87,7 +87,7 @@ Returns a C<HTTP::Response> object.
 
 =head1 FUNCTIONS
 
-=head2 ($res, $c) = crequest( ... );
+=head2 ($res, $c) = ctx_request( ... );
 
 Works exactly like C<Catalyst::Test::request>, except it also returns the
 catalyst context object, C<$c>. Note that this only works for local requests.
@@ -119,12 +119,12 @@ sub import {
     no strict 'refs';
     my $caller = caller(0);
     
-    *{"$caller\::request"}  = $request;
-    *{"$caller\::get"}      = $get;
-    *{"$caller\::crequest"} = sub { 
+    *{"$caller\::request"}      = $request;
+    *{"$caller\::get"}          = $get;
+    *{"$caller\::ctx_request"}  = sub { 
         my $me      = ref $self || $self;
 
-        ### throw an exception if crequest is being used against a remote
+        ### throw an exception if ctx_request is being used against a remote
         ### server
         Catalyst::Exception->throw("$me only works with local requests, not remote")     
             if $ENV{CATALYST_SERVER};