From: John Napiorkowski Date: Wed, 23 Jun 2010 18:58:31 +0000 (-0400) Subject: finished the big rename and directory shuffle. X-Git-Tag: 0.01~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ca01e833d59b1af84a52e2c10ae62ede34d6f169;p=gitmo%2FMooseX-Dependent.git finished the big rename and directory shuffle. --- diff --git a/Makefile.PL b/Makefile.PL index 7cd3009..9ab8869 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -3,11 +3,9 @@ use strict; use warnings; use inc::Module::Install 1.00; -name 'MooseX-Parameterizable-Types'; -all_from 'lib/MooseX/Parameterizable/Types.pm'; +name 'MooseX-Types-Parameterizable'; +all_from 'lib/MooseX/Types/Parameterizable.pm'; author 'John Napiorkowski '; -## repository 'git://git.moose.perl.org/MooseX-Parameterizable.git' - license 'perl'; requires 'Moose' => '1.08'; diff --git a/lib/MooseX/Parameterizable/Meta/TypeCoercion/Parameterizable.pm b/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm similarity index 97% rename from lib/MooseX/Parameterizable/Meta/TypeCoercion/Parameterizable.pm rename to lib/MooseX/Meta/TypeCoercion/Parameterizable.pm index 1f39519..6a07ac6 100644 --- a/lib/MooseX/Parameterizable/Meta/TypeCoercion/Parameterizable.pm +++ b/lib/MooseX/Meta/TypeCoercion/Parameterizable.pm @@ -1,5 +1,5 @@ package ## Hide from PAUSE - MooseX::Parameterizable::Meta::TypeCoercion::Parameterizable; + MooseX::Meta::TypeCoercion::Parameterizable; use Moose; extends 'Moose::Meta::TypeCoercion'; diff --git a/lib/MooseX/Parameterizable/Meta/TypeConstraint/Parameterizable.pm b/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm similarity index 96% rename from lib/MooseX/Parameterizable/Meta/TypeConstraint/Parameterizable.pm rename to lib/MooseX/Meta/TypeConstraint/Parameterizable.pm index 3dedf12..3afb43d 100644 --- a/lib/MooseX/Parameterizable/Meta/TypeConstraint/Parameterizable.pm +++ b/lib/MooseX/Meta/TypeConstraint/Parameterizable.pm @@ -1,9 +1,9 @@ package ## Hide from PAUSE - MooseX::Parameterizable::Meta::TypeConstraint::Parameterizable; + MooseX::Meta::TypeConstraint::Parameterizable; use Moose; use Moose::Util::TypeConstraints (); -use MooseX::Parameterizable::Meta::TypeCoercion::Parameterizable; +use MooseX::Meta::TypeCoercion::Parameterizable; use Scalar::Util qw(blessed); use Data::Dump; use Digest::MD5; @@ -12,11 +12,11 @@ extends 'Moose::Meta::TypeConstraint'; =head1 NAME -MooseX::Parameterizable::Meta::TypeConstraint::Parameterizable - Metaclass for Parameterizable type constraints. +MooseX::Meta::TypeConstraint::Parameterizable - Metaclass for Parameterizable type constraints. =head1 DESCRIPTION -see L for examples and details of how to use parameterizable +see L for how to use parameterizable types. This class is a subclass of L which provides the gut functionality to enable parameterizable type constraints. @@ -83,12 +83,12 @@ Do some post build stuff =cut ## Right now I add in the parameterizable type coercion until I can merge some Moose -## changes upstream +## changes upstream. TODO change to BUILD or something around 'new' => sub { my ($new, $class, @args) = @_; my $self = $class->$new(@args); - my $coercion = MooseX::Parameterizable::Meta::TypeCoercion::Parameterizable->new(type_constraint => $self); + my $coercion = MooseX::Meta::TypeCoercion::Parameterizable->new(type_constraint => $self); $self->coercion($coercion); return $self; }; diff --git a/lib/MooseX/Parameterizable/Types.pm b/lib/MooseX/Types/Parameterizable.pm similarity index 95% rename from lib/MooseX/Parameterizable/Types.pm rename to lib/MooseX/Types/Parameterizable.pm index 7608d10..1f257da 100644 --- a/lib/MooseX/Parameterizable/Types.pm +++ b/lib/MooseX/Types/Parameterizable.pm @@ -1,4 +1,4 @@ -package MooseX::Parameterizable::Types; +package MooseX::Types::Parameterizable; use 5.008; @@ -6,18 +6,18 @@ our $VERSION = '0.01'; $VERSION = eval $VERSION; use Moose::Util::TypeConstraints; -use MooseX::Parameterizable::Meta::TypeConstraint::Parameterizable; +use MooseX::Meta::TypeConstraint::Parameterizable; use MooseX::Types -declare => [qw(Parameterizable)]; =head1 NAME -MooseX::Parameterizable::Types - Create your own Parameterizable Types. +MooseX::Types::Parameterizable - Create your own Parameterizable Types. =head1 SYNOPSIS Within your L declared library module: - use MooseX::Parameterizable::Types qw(Parameterizable); + use MooseX::Types::Parameterizable qw(Parameterizable); subtype Set, as class_type("Set::Scalar"); @@ -267,8 +267,8 @@ will cause an exception. =cut Moose::Util::TypeConstraints::get_type_constraint_registry->add_type_constraint( - MooseX::Parameterizable::Meta::TypeConstraint::Parameterizable->new( - name => 'MooseX::Parameterizable::Types::Parameterizable', + MooseX::Meta::TypeConstraint::Parameterizable->new( + name => 'MooseX::Types::Parameterizable::Parameterizable', parent => find_type_constraint('Any'), constraint => sub {1}, ) diff --git a/t/00-load.t b/t/00-load.t index 8a3706f..2f36164 100644 --- a/t/00-load.t +++ b/t/00-load.t @@ -3,7 +3,7 @@ use Test::More tests=>3; use strict; use warnings; -use_ok 'MooseX::Parameterizable::Types'; -use_ok 'MooseX::Parameterizable::Meta::TypeConstraint::Parameterizable'; -use_ok 'MooseX::Parameterizable::Meta::TypeCoercion::Parameterizable'; +use_ok 'MooseX::Types::Parameterizable'; +use_ok 'MooseX::Meta::TypeConstraint::Parameterizable'; +use_ok 'MooseX::Meta::TypeCoercion::Parameterizable'; diff --git a/t/01-types-parameterizable.t b/t/01-types-parameterizable.t index deb719e..fa9c0cc 100644 --- a/t/01-types-parameterizable.t +++ b/t/01-types-parameterizable.t @@ -4,7 +4,7 @@ use Test::More tests=>79; { use strict; use warnings; - use MooseX::Parameterizable::Types qw(Parameterizable); + use MooseX::Types::Parameterizable qw(Parameterizable); use MooseX::Types::Moose qw(Int Any Maybe); use Moose::Util::TypeConstraints; @@ -21,11 +21,11 @@ use Test::More tests=>79; { is Parameterizable->parent, 'Any', 'Parameterizable is an Any'; - is Parameterizable->name, 'MooseX::Parameterizable::Types::Parameterizable', + is Parameterizable->name, 'MooseX::Types::Parameterizable::Parameterizable', 'Parameterizable has expected name'; like Parameterizable->get_message, - qr/Validation failed for 'MooseX::Parameterizable::Types::Parameterizable' with value undef/, + qr/Validation failed for 'MooseX::Types::Parameterizable::Parameterizable' with value undef/, 'Got Expected Message'; ok Parameterizable->equals(Parameterizable), @@ -53,7 +53,7 @@ use Test::More tests=>79; { is SubParameterizable->validate(1), undef, 'validate returned no error message'; - is SubParameterizable->parent, 'MooseX::Parameterizable::Types::Parameterizable', + is SubParameterizable->parent, 'MooseX::Types::Parameterizable::Parameterizable', 'SubParameterizable is a Parameterizable'; is SubParameterizable->name, 'main::SubParameterizable', @@ -134,7 +134,7 @@ use Test::More tests=>79; { is IntLessThan->name, 'main::IntLessThan', 'Got correct name for IntLessThan'; - is IntLessThan->parent, 'MooseX::Parameterizable::Types::Parameterizable[main::EvenInt, Maybe[Int]]', + is IntLessThan->parent, 'MooseX::Types::Parameterizable::Parameterizable[main::EvenInt, Maybe[Int]]', 'IntLessThan is a Parameterizable'; is IntLessThan->parent_type_constraint, EvenInt, diff --git a/t/02-types-parameterizable-extended.t b/t/02-types-parameterizable-extended.t index 37b6151..061dba5 100644 --- a/t/02-types-parameterizable-extended.t +++ b/t/02-types-parameterizable-extended.t @@ -15,7 +15,7 @@ use Test::More; { } use MooseX::Types::Structured qw(Tuple Dict slurpy); - use MooseX::Parameterizable::Types qw(Parameterizable); + use MooseX::Types::Parameterizable qw(Parameterizable); use MooseX::Types::Moose qw(Int Str); use Moose::Util::TypeConstraints; diff --git a/t/03-coercions.t b/t/03-coercions.t index 5e19ddc..1e105be 100644 --- a/t/03-coercions.t +++ b/t/03-coercions.t @@ -4,7 +4,7 @@ use Test::More tests=>15; { use strict; use warnings; - use MooseX::Parameterizable::Types qw(Parameterizable); + use MooseX::Types::Parameterizable qw(Parameterizable); use MooseX::Types::Moose qw(Int Str HashRef ArrayRef); use MooseX::Types -declare=>[qw(