[Catalyst] need to patch Test::WWW::Mechanize::Catalyst

Jason Gottshall jgottshall at capwiz.com
Wed Nov 19 21:13:57 GMT 2008


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 =3D> '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?
> =

> =10The maintainer is L=E9on 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
jgottshall at capwiz.com

-------------- next part --------------
--- 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 ) =3D @_;
-    eval "use Catalyst::Test '$name'";
+    eval {
+        require Catalyst::Test;
+        Catalyst::Test::import(@_);
+    };
     warn $@ if $@;
 }



More information about the Catalyst mailing list