requires 'Email::MIME::Creator';
requires 'Text::CSV_XS';
requires 'Devel::Declare' => '0.001006';
+requires 'MooseX::Types' => '0.04';
catalyst;
use Moose qw(confess);
use Sub::Exporter ();
use Sub::Name ();
-use Reaction::Types::Core;
+use Reaction::Types::Core ':all';
use Reaction::Object;
sub exporter_for_package {
package Reaction::InterfaceModel::Action::DBIC::Result::Delete;
-use Reaction::Types::DBIC;
+use Reaction::Types::DBIC 'Row';
use Reaction::Class;
class Delete is 'Reaction::InterfaceModel::Action', which {
- has '+target_model' => (isa => 'DBIx::Class::Row');
+ has '+target_model' => (isa => 'Row');
sub can_apply { 1 }
package Reaction::InterfaceModel::Action::DBIC::Result::Update;
use Reaction::InterfaceModel::Action;
-use Reaction::Types::DBIC;
+use Reaction::Types::DBIC 'Row';
use Reaction::Class;
class Update is 'Reaction::InterfaceModel::Action', which {
does 'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques';
- has '+target_model' => (isa => 'DBIx::Class::Row');
+ has '+target_model' => (isa => 'Row');
implements BUILD => as {
my ($self) = @_;
package Reaction::InterfaceModel::Action::DBIC::ResultSet::Create;
-use Reaction::Types::DBIC;
+use Reaction::Types::DBIC 'ResultSet';
use Reaction::Class;
use Reaction::InterfaceModel::Action;
use Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
does 'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques';
- has '+target_model' => (isa => 'DBIx::Class::ResultSet');
+ has '+target_model' => (isa => 'ResultSet');
implements do_apply => as {
my $self = shift;
package Reaction::InterfaceModel::Action::DBIC::ResultSet::DeleteAll;
-use Reaction::Types::DBIC;
+use Reaction::Types::DBIC 'ResultSet';
use Reaction::Class;
use Reaction::InterfaceModel::Action;
class DeleteAll is 'Reaction::InterfaceModel::Action', which {
- has '+target_model' => (isa => 'DBIx::Class::ResultSet');
+ has '+target_model' => (isa => 'ResultSet');
sub can_apply { 1 }
package Reaction::Types::Core;
-use Moose::Util::TypeConstraints;
+use MooseX::Types
+ -declare => [qw/SimpleStr NonEmptySimpleStr Password StrongPassword
+ NonEmptyStr PositiveNum PositiveInt SingleDigit/];
+
+use MooseX::Types::Moose qw/Str Num Int/;
subtype 'SimpleStr'
=> as 'Str'
subtype 'StrongPassword'
=> as 'Password'
=> where { (length($_) > 7) && (m/[^a-zA-Z]/) }
- => message { "Must be between 8 and 255 chars, and contain a non-alpha char" };
+ => message {
+ "Must be between 8 and 255 chars, and contain a non-alpha char" };
subtype 'NonEmptyStr'
=> as 'Str'
package Reaction::Types::DBIC;
-use Moose::Util::TypeConstraints;
+use MooseX::Types
+ -declare => [qw/ResultSet Row/];
+use MooseX::Types::Moose 'Object';
use DBIx::Class::ResultSet;
-subtype 'DBIx::Class::ResultSet'
+subtype 'ResultSet'
=> as 'Object'
=> where { $_->isa('DBIx::Class::ResultSet') };
use DBIx::Class::Core;
use DBIx::Class::Row;
-subtype 'DBIx::Class::Row'
+subtype 'Row'
=> as 'Object'
=> where { $_->isa('DBIx::Class::Row') };
package Reaction::Types::DateTime;
-use Moose::Util::TypeConstraints;
+use MooseX::Types
+ -declare => [qw/DateTime SpanSet TimeRangeCollection/];
+use MooseX::Types::Moose qw/Object ArrayRef/;
use DateTime;
subtype 'DateTime'
use DateTime::SpanSet;
-subtype 'DateTime::SpanSet'
+subtype 'SpanSet'
=> as 'Object'
=> where { $_->isa('DateTime::SpanSet') };
package Reaction::Types::Email;
-use Moose::Util::TypeConstraints;
+use MooseX::Types
+ -declare => [qw/EmailAddress/];
+
+use Reaction::Types::Core 'NonEmptySimpleStr';
use Email::Valid;
subtype 'EmailAddress'
package Reaction::Types::File;
-use Moose::Util::TypeConstraints;
+use MooseX::Types
+ -declare => [qw/File/];
+use MooseX::Types::Moose 'Object';
use Catalyst::Request::Upload;
subtype 'File'
class TimeRange is 'Reaction::UI::ViewPort::Field', which {
- has '+value' => (isa => 'DateTime::SpanSet');
+ has '+value' => (isa => 'SpanSet');
#has '+layout' => (default => 'timerange');