Ash Berlin wrote:

On 19 Nov 2008, at 20:21, Jason Gottshall wrote:

My recent patch to 5.80 trunk (svn rev 8612) enables the setting of a
default virtual hostname via import:

 use Catalyst::Test 'MyApp', { default_host => 'virtual.com' };

Based on my reading of the Test::WWW::Mech::Catalyst source, some minor
changes would need to be made there in order to use the same semantics
with Mech::Cat. Should I try to patch this myself, or is there a maintainer out there who can make it happen?

The maintainer is Léon Brocard. But send a patch and make his life easier :)

Patch attached. I hope it really was as easy as it looked. Did I miss anything?

--
Jason Gottshall
[EMAIL PROTECTED]

--- orig/Test/WWW/Mechanize/Catalyst.pm 2008-10-27 09:50:54.000000000 -0400
+++ new/Test/WWW/Mechanize/Catalyst.pm  2008-11-19 15:58:40.000000000 -0500
@@ -98,8 +98,10 @@
 package Test::WWW::Mechanize::Catalyst::Aux;

 sub import {
-    my ( $class, $name ) = @_;
-    eval "use Catalyst::Test '$name'";
+    eval {
+        require Catalyst::Test;
+        Catalyst::Test::import(@_);
+    };
     warn $@ if $@;
 }

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to