Remove "where {1}" from subtype declarations.
Dave Rolsky [Mon, 12 Sep 2011 03:25:45 +0000 (22:25 -0500)]
This isn't necessary, doesn't do anything, and will interfere with things like
inlining, as the presence of the where clause will make Moose think there's a
real additional constraint on the type.

lib/Catalyst/Engine.pm
lib/Catalyst/Script/Server.pm

index 23a1d3f..1e56bdc 100644 (file)
@@ -46,8 +46,8 @@ has _response_cb => (
 );
 
 subtype 'Catalyst::Engine::Types::Writer',
-    as duck_type([qw(write close)]),
-    where { 1 };
+    as duck_type([qw(write close)]);
+
 has _writer => (
     is      => 'ro',
     isa     => 'Catalyst::Engine::Types::Writer',
index 328773c..df61d9d 100644 (file)
@@ -48,8 +48,8 @@ has port => (
 use Moose::Util::TypeConstraints;
 class_type 'MooseX::Daemonize::Pid::File';
 subtype 'Catalyst::Script::Server::Types::Pidfile',
-    as 'MooseX::Daemonize::Pid::File',
-    where { 1 };
+    as 'MooseX::Daemonize::Pid::File';
+
 coerce 'Catalyst::Script::Server::Types::Pidfile', from Str, via {
     try { Class::MOP::load_class("MooseX::Daemonize::Pid::File") }
     catch {