Documentation:
- Clarify that uri_for_action works on private paths, with example.
+ Deprecations:
+ - Saying use Catalyst::Test; (without an application name or () to stop
+ the importer running is now deprecated and will issue a warning.
+ You should be saying use Catalyst::Test ();
+
5.80017 2010-01-10 02:27:29
Documentation:
sub import {
my ($self, $class, $opts) = @_;
+ Carp::carp(
+qq{Importing Catalyst::Test without an application name is deprecated:\n
+Instead of saying: use Catalyst::Test;
+say: use Catalyst::Test (); # If you don't want to import a test app right now.
+or say: use Catalyst::Test 'MyApp'; # If you do want to import a test app.\n\n})
+ unless $class;
$import->($self, '-all' => { class => $class });
$opts = {} unless ref $opts eq 'HASH';
$default_host = $opts->{default_host} if exists $opts->{default_host};
--- /dev/null
+use strict;
+use warnings;
+
+use Test::More;
+use Catalyst::Test ();
+
+my $warn;
+{
+ local $SIG{__WARN__} = sub { $warn = shift; };
+ Catalyst::Test->import();
+}
+ok $warn;
+like $warn, qr/deprecated/;
+
+done_testing;
+