From: Vincent Pit Date: Wed, 22 Apr 2015 14:31:06 +0000 (-0300) Subject: Just use Mouse instead of Any::Moose X-Git-Tag: v0.03~11 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLaTeX-TikZ.git;a=commitdiff_plain;h=3661d7849ae4636b74000e33e068493d90ed8337 Just use Mouse instead of Any::Moose Any::Moose is deprecated, and the autocoerce meta trait does not work anymore with Moose. --- diff --git a/Makefile.PL b/Makefile.PL index d8ea7a6..a7ef8d3 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -12,7 +12,6 @@ my $dist = 'LaTeX-TikZ'; $file = "lib/$file.pm"; my %PREREQ_PM = ( - 'Any::Moose' => 0, 'Carp' => 0, 'List::Util' => 0, 'Math::Complex' => 0, diff --git a/lib/LaTeX/TikZ.pm b/lib/LaTeX/TikZ.pm index b035f00..aca817d 100644 --- a/lib/LaTeX/TikZ.pm +++ b/lib/LaTeX/TikZ.pm @@ -382,7 +382,7 @@ sub import { =head1 DEPENDENCIES -L with L 0.80 or greater. +L 0.80 or greater. L. diff --git a/lib/LaTeX/TikZ/Context.pm b/lib/LaTeX/TikZ/Context.pm index 5909cb8..173c02f 100644 --- a/lib/LaTeX/TikZ/Context.pm +++ b/lib/LaTeX/TikZ/Context.pm @@ -19,7 +19,7 @@ use LaTeX::TikZ::Mod (); # Required to work around a bug in Mouse use LaTeX::TikZ::Tools; -use Any::Moose; +use Mouse; =head1 ATTRIBUTES diff --git a/lib/LaTeX/TikZ/Formatter.pm b/lib/LaTeX/TikZ/Formatter.pm index e5bb3cf..2b87450 100644 --- a/lib/LaTeX/TikZ/Formatter.pm +++ b/lib/LaTeX/TikZ/Formatter.pm @@ -29,8 +29,8 @@ use LaTeX::TikZ::Interface; use LaTeX::TikZ::Tools; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints'; +use Mouse; +use Mouse::Util::TypeConstraints; =head1 ATTRIBUTES @@ -361,7 +361,7 @@ LaTeX::TikZ::Interface->register( }, ); -__PACKAGE__->meta->make_immutable if any_moose() ne 'Moose'; +__PACKAGE__->meta->make_immutable; =head1 SEE ALSO diff --git a/lib/LaTeX/TikZ/Functor/Rule.pm b/lib/LaTeX/TikZ/Functor/Rule.pm index 4dbe979..8cebab1 100644 --- a/lib/LaTeX/TikZ/Functor/Rule.pm +++ b/lib/LaTeX/TikZ/Functor/Rule.pm @@ -24,9 +24,9 @@ A functor is basically an ordered collection of rules. use Carp (); -use Any::Moose; -use Any::Moose 'Util' => [ qw ]; -use Any::Moose 'Util::TypeConstraints'; +use Mouse; +use Mouse::Util qw; +use Mouse::Util::TypeConstraints; =head1 ATTRIBUTES @@ -105,7 +105,7 @@ around 'BUILDARGS' => sub { my $meta = find_meta($target); Carp::confess("No meta object associated with target $target") unless defined $meta; - $args{is_role} = $meta->isa(any_moose('Meta::Role')); + $args{is_role} = $meta->isa('Mouse::Meta::Role'); my $is_set; if (does_role($target, 'LaTeX::TikZ::Set')) { diff --git a/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm b/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm index 7671ade..dca3e69 100644 --- a/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm +++ b/lib/LaTeX/TikZ/Meta/TypeConstraint/Autocoerce.pm @@ -20,13 +20,13 @@ our $VERSION = '0.02'; # The target class of the autocoercion (cannot be changed) { package X; - use Any::Moose; + use Mouse; has 'id' => ( is => 'ro', isa => 'Int', ); use LaTeX::TikZ::Meta::TypeConstraint::Autocoerce; - use Any::Moose 'Util::TypeConstraints'; + use Mouse::Util::TypeConstraints; register_type_constraint( LaTeX::TikZ::Meta::TypeConstraint::Autocoerce->new( name => 'X::Autocoerce', @@ -40,22 +40,20 @@ our $VERSION = '0.02'; # The class that does the coercion (cannot be changed) { package Y; - use Any::Moose; + use Mouse; has 'x' => ( is => 'ro', isa => 'X::Autocoerce', coerce => 1, handles => [ 'id' ], ); - # This class shouldn't be immutable when using Moose, or the - # coercing attributes will not be updated with the future coercions. - __PACKAGE__->meta->make_immutable if any_moose() ne 'Moose'; + __PACKAGE__->meta->make_immutable; } # Another class the user wants to use instead of X (cannot be changed) { package Z; - use Any::Moose; + use Mouse; has 'id' => ( is => 'ro', isa => 'Num', @@ -66,7 +64,7 @@ our $VERSION = '0.02'; # The autocoercion class, defined by the user in X/From/Z.pm { package X::From::Z; - use Any::Moose 'Util::TypeConstraints'; + use Mouse::Util::TypeConstraints; coerce 'X::Autocoerce' => from 'Z' => via { X->new(id => int $_->id) }; @@ -81,9 +79,9 @@ our $VERSION = '0.02'; When a type coercion is attempted, this type constraint metaclass tries to autoload a specific module which is supposed to contain the actual coercion code. This allows you to declare types that can be replaced (through coercion) at the end user's discretion. -It works with both L and L by using L. +It only supports L currently. -Note that you will need L or L to install this type constraint, and that the latter is only available starting L C<0.63>. +Note that you will need L to install this type constraint, which is only available starting L C<0.63>. =cut @@ -93,15 +91,15 @@ use Sub::Name (); use LaTeX::TikZ::Tools; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS -This class inherits from L or L, depending on which mode L runs. +This class inherits from L. =cut -extends any_moose('Meta::TypeConstraint'); +extends 'Mouse::Meta::TypeConstraint'; =head1 ATTRIBUTES @@ -110,7 +108,7 @@ extends any_moose('Meta::TypeConstraint'); The name of the type constraint. This must be the target of both the classes that want to use the autocoercion feature and the user defined coercions in the autoloaded classes. -This attribute is inherited from the L or L type constraint metaclass. +This attribute is inherited from the L type constraint metaclass. =head2 C @@ -135,7 +133,7 @@ If it is given as a plain string, then a type constraint with the same name is s has 'target' => ( is => 'ro', - isa => any_moose('Meta::TypeConstraint'), + isa => 'Mouse::Meta::TypeConstraint', required => 1, ); @@ -166,10 +164,6 @@ around 'new' => sub { $target_tc->assert_valid($target); $args{target} = $target; - if (any_moose() eq 'Moose') { - $args{coercion} = Moose::Meta::TypeCoercion->new; - } - $args{constraint} = Sub::Name::subname('_constraint' => sub { my ($thing) = @_; @@ -233,7 +227,7 @@ __PACKAGE__->meta->make_immutable( =head1 SEE ALSO -L, L. +L. =head1 AUTHOR diff --git a/lib/LaTeX/TikZ/Mod.pm b/lib/LaTeX/TikZ/Mod.pm index 46c61f7..6138e5b 100644 --- a/lib/LaTeX/TikZ/Mod.pm +++ b/lib/LaTeX/TikZ/Mod.pm @@ -21,8 +21,8 @@ This role should be consumed by all the modifier classes. =cut -use Any::Moose 'Role'; -use Any::Moose 'Util::TypeConstraints'; +use Mouse::Role; +use Mouse::Util::TypeConstraints; =head1 METHODS diff --git a/lib/LaTeX/TikZ/Mod/Clip.pm b/lib/LaTeX/TikZ/Mod/Clip.pm index 1b61b4d..9a301fc 100644 --- a/lib/LaTeX/TikZ/Mod/Clip.pm +++ b/lib/LaTeX/TikZ/Mod/Clip.pm @@ -25,7 +25,7 @@ use LaTeX::TikZ::Functor; use LaTeX::TikZ::Tools; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Mod/Color.pm b/lib/LaTeX/TikZ/Mod/Color.pm index 34f412e..63248d3 100644 --- a/lib/LaTeX/TikZ/Mod/Color.pm +++ b/lib/LaTeX/TikZ/Mod/Color.pm @@ -17,7 +17,7 @@ our $VERSION = '0.02'; use LaTeX::TikZ::Interface; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Mod/Fill.pm b/lib/LaTeX/TikZ/Mod/Fill.pm index a8f548f..b5ae969 100644 --- a/lib/LaTeX/TikZ/Mod/Fill.pm +++ b/lib/LaTeX/TikZ/Mod/Fill.pm @@ -17,7 +17,7 @@ our $VERSION = '0.02'; use LaTeX::TikZ::Interface; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Mod/Formatted.pm b/lib/LaTeX/TikZ/Mod/Formatted.pm index 2dd820b..c1352dd 100644 --- a/lib/LaTeX/TikZ/Mod/Formatted.pm +++ b/lib/LaTeX/TikZ/Mod/Formatted.pm @@ -15,11 +15,8 @@ Version 0.02 our $VERSION = '0.02'; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints' => [ - 'enum', - qw, -]; +use Mouse; +use Mouse::Util::TypeConstraints qw; =head1 ATTRIBUTES diff --git a/lib/LaTeX/TikZ/Mod/Layer.pm b/lib/LaTeX/TikZ/Mod/Layer.pm index f76e153..cff2663 100644 --- a/lib/LaTeX/TikZ/Mod/Layer.pm +++ b/lib/LaTeX/TikZ/Mod/Layer.pm @@ -22,8 +22,8 @@ use LaTeX::TikZ::Mod::Formatted; use LaTeX::TikZ::Interface; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints'; +use Mouse; +use Mouse::Util::TypeConstraints; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Mod/Pattern.pm b/lib/LaTeX/TikZ/Mod/Pattern.pm index d9dbb17..50bfc13 100644 --- a/lib/LaTeX/TikZ/Mod/Pattern.pm +++ b/lib/LaTeX/TikZ/Mod/Pattern.pm @@ -17,7 +17,7 @@ our $VERSION = '0.02'; use LaTeX::TikZ::Interface; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm b/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm index 7e15b5f..05c756c 100644 --- a/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm +++ b/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm @@ -17,8 +17,8 @@ our $VERSION = '0.02'; use Sub::Name (); -use Any::Moose; -use Any::Moose 'Util::TypeConstraints'; +use Mouse; +use Mouse::Util::TypeConstraints; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm b/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm index 193b68e..1e3a2db 100644 --- a/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm +++ b/lib/LaTeX/TikZ/Mod/Pattern/Lines.pm @@ -19,8 +19,8 @@ use Sub::Name (); use LaTeX::TikZ::Tools; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints'; +use Mouse; +use Mouse::Util::TypeConstraints; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Mod/Raw.pm b/lib/LaTeX/TikZ/Mod/Raw.pm index a4caa72..f0b3b44 100644 --- a/lib/LaTeX/TikZ/Mod/Raw.pm +++ b/lib/LaTeX/TikZ/Mod/Raw.pm @@ -17,7 +17,7 @@ our $VERSION = '0.02'; use LaTeX::TikZ::Interface; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Mod/Scale.pm b/lib/LaTeX/TikZ/Mod/Scale.pm index 51c79e9..5a36e65 100644 --- a/lib/LaTeX/TikZ/Mod/Scale.pm +++ b/lib/LaTeX/TikZ/Mod/Scale.pm @@ -19,7 +19,7 @@ use LaTeX::TikZ::Interface; use LaTeX::TikZ::Tools; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Mod/Width.pm b/lib/LaTeX/TikZ/Mod/Width.pm index d0ee31e..efdd120 100644 --- a/lib/LaTeX/TikZ/Mod/Width.pm +++ b/lib/LaTeX/TikZ/Mod/Width.pm @@ -19,7 +19,7 @@ use LaTeX::TikZ::Interface; use LaTeX::TikZ::Tools; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Point.pm b/lib/LaTeX/TikZ/Point.pm index 01d562d..151f50f 100644 --- a/lib/LaTeX/TikZ/Point.pm +++ b/lib/LaTeX/TikZ/Point.pm @@ -15,14 +15,12 @@ Version 0.02 our $VERSION = '0.02'; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints' => [ qw< - coerce - from - via +use Mouse; +use Mouse::Util::TypeConstraints qw< + coerce from via find_type_constraint register_type_constraint -> ]; +>; =head1 ATTRIBUTES diff --git a/lib/LaTeX/TikZ/Point/Math/Complex.pm b/lib/LaTeX/TikZ/Point/Math/Complex.pm index 56ba905..84450af 100644 --- a/lib/LaTeX/TikZ/Point/Math/Complex.pm +++ b/lib/LaTeX/TikZ/Point/Math/Complex.pm @@ -19,12 +19,7 @@ use Math::Complex; use LaTeX::TikZ::Point; -use Any::Moose 'Util::TypeConstraints' => [ qw< - class_type - coerce - from - via -> ]; +use Mouse::Util::TypeConstraints qw; my $mc_tc = class_type 'Math::Complex'; diff --git a/lib/LaTeX/TikZ/Scope.pm b/lib/LaTeX/TikZ/Scope.pm index 2222349..eb009ea 100644 --- a/lib/LaTeX/TikZ/Scope.pm +++ b/lib/LaTeX/TikZ/Scope.pm @@ -19,7 +19,7 @@ use Sub::Name (); use LaTeX::TikZ::Tools; -use Any::Moose; +use Mouse; =head1 ATTRIBUTES diff --git a/lib/LaTeX/TikZ/Set.pm b/lib/LaTeX/TikZ/Set.pm index a6dd87f..44ee46f 100644 --- a/lib/LaTeX/TikZ/Set.pm +++ b/lib/LaTeX/TikZ/Set.pm @@ -20,7 +20,7 @@ use LaTeX::TikZ::Scope; use LaTeX::TikZ::Tools; -use Any::Moose 'Role'; +use Mouse::Role; =head1 ATTRIBUTES diff --git a/lib/LaTeX/TikZ/Set/Arc.pm b/lib/LaTeX/TikZ/Set/Arc.pm index 38fff77..69fd1cf 100644 --- a/lib/LaTeX/TikZ/Set/Arc.pm +++ b/lib/LaTeX/TikZ/Set/Arc.pm @@ -28,7 +28,7 @@ use LaTeX::TikZ::Interface; use LaTeX::TikZ::Tools; -use Any::Moose 'Util::TypeConstraints' => [ 'find_type_constraint' ]; +use Mouse::Util::TypeConstraints 'find_type_constraint'; my $ltp_tc = find_type_constraint('LaTeX::TikZ::Point::Autocoerce'); diff --git a/lib/LaTeX/TikZ/Set/Arrow.pm b/lib/LaTeX/TikZ/Set/Arrow.pm index f08a879..6011f05 100644 --- a/lib/LaTeX/TikZ/Set/Arrow.pm +++ b/lib/LaTeX/TikZ/Set/Arrow.pm @@ -23,7 +23,7 @@ use LaTeX::TikZ::Set::Line; use LaTeX::TikZ::Interface; -use Any::Moose 'Util::TypeConstraints' => [ 'find_type_constraint' ]; +use Mouse::Util::TypeConstraints 'find_type_constraint'; my $ltp_tc = find_type_constraint('LaTeX::TikZ::Point::Autocoerce'); diff --git a/lib/LaTeX/TikZ/Set/Chain.pm b/lib/LaTeX/TikZ/Set/Chain.pm index 722815a..d8ddd39 100644 --- a/lib/LaTeX/TikZ/Set/Chain.pm +++ b/lib/LaTeX/TikZ/Set/Chain.pm @@ -23,8 +23,8 @@ use LaTeX::TikZ::Functor; use LaTeX::TikZ::Tools; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints' => [ qw ]; +use Mouse; +use Mouse::Util::TypeConstraints qw; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Set/Circle.pm b/lib/LaTeX/TikZ/Set/Circle.pm index 0de14df..89c73cf 100644 --- a/lib/LaTeX/TikZ/Set/Circle.pm +++ b/lib/LaTeX/TikZ/Set/Circle.pm @@ -22,8 +22,8 @@ use LaTeX::TikZ::Functor; use LaTeX::TikZ::Tools; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints'; +use Mouse; +use Mouse::Util::TypeConstraints; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Set/Container.pm b/lib/LaTeX/TikZ/Set/Container.pm index 37a56cd..ba97538 100644 --- a/lib/LaTeX/TikZ/Set/Container.pm +++ b/lib/LaTeX/TikZ/Set/Container.pm @@ -32,7 +32,7 @@ an C method describing how more elements can be added to the set. our $VERSION = '0.02'; -use Any::Moose 'Role'; +use Mouse::Role; =head1 METHODS diff --git a/lib/LaTeX/TikZ/Set/Line.pm b/lib/LaTeX/TikZ/Set/Line.pm index faa4ccb..0a455c9 100644 --- a/lib/LaTeX/TikZ/Set/Line.pm +++ b/lib/LaTeX/TikZ/Set/Line.pm @@ -20,7 +20,7 @@ use LaTeX::TikZ::Set::Point; use LaTeX::TikZ::Interface; use LaTeX::TikZ::Functor; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Set/Path.pm b/lib/LaTeX/TikZ/Set/Path.pm index e681828..259e1ce 100644 --- a/lib/LaTeX/TikZ/Set/Path.pm +++ b/lib/LaTeX/TikZ/Set/Path.pm @@ -21,7 +21,7 @@ Paths are all the elements against which we can call the C method. =cut -use Any::Moose 'Role'; +use Mouse::Role; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Set/Point.pm b/lib/LaTeX/TikZ/Set/Point.pm index 6e78e66..862ce89 100644 --- a/lib/LaTeX/TikZ/Set/Point.pm +++ b/lib/LaTeX/TikZ/Set/Point.pm @@ -20,8 +20,8 @@ use LaTeX::TikZ::Point; use LaTeX::TikZ::Interface; use LaTeX::TikZ::Functor; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints'; +use Mouse; +use Mouse::Util::TypeConstraints; =head1 RELATIONSHIPS @@ -154,7 +154,7 @@ LaTeX::TikZ::Functor->default_rule( } ); -__PACKAGE__->meta->make_immutable if any_moose() ne 'Moose'; +__PACKAGE__->meta->make_immutable; =head1 SEE ALSO diff --git a/lib/LaTeX/TikZ/Set/Polyline.pm b/lib/LaTeX/TikZ/Set/Polyline.pm index e8e0ee0..445beb5 100644 --- a/lib/LaTeX/TikZ/Set/Polyline.pm +++ b/lib/LaTeX/TikZ/Set/Polyline.pm @@ -20,8 +20,8 @@ use LaTeX::TikZ::Set::Point; use LaTeX::TikZ::Interface; use LaTeX::TikZ::Functor; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints'; +use Mouse; +use Mouse::Util::TypeConstraints; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Set/Raw.pm b/lib/LaTeX/TikZ/Set/Raw.pm index 8641287..c8a86a2 100644 --- a/lib/LaTeX/TikZ/Set/Raw.pm +++ b/lib/LaTeX/TikZ/Set/Raw.pm @@ -18,7 +18,7 @@ our $VERSION = '0.02'; use LaTeX::TikZ::Interface; use LaTeX::TikZ::Functor; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Set/Rectangle.pm b/lib/LaTeX/TikZ/Set/Rectangle.pm index 838ff95..322329a 100644 --- a/lib/LaTeX/TikZ/Set/Rectangle.pm +++ b/lib/LaTeX/TikZ/Set/Rectangle.pm @@ -20,7 +20,7 @@ use LaTeX::TikZ::Set::Point; use LaTeX::TikZ::Interface; use LaTeX::TikZ::Functor; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Set/Sequence.pm b/lib/LaTeX/TikZ/Set/Sequence.pm index 70176a1..9d800f8 100644 --- a/lib/LaTeX/TikZ/Set/Sequence.pm +++ b/lib/LaTeX/TikZ/Set/Sequence.pm @@ -22,9 +22,8 @@ use LaTeX::TikZ::Scope; use LaTeX::TikZ::Interface; use LaTeX::TikZ::Functor; -use Any::Moose; -use Any::Moose 'Util::TypeConstraints' - => [ qw ]; +use Mouse; +use Mouse::Util::TypeConstraints qw; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Set/Union.pm b/lib/LaTeX/TikZ/Set/Union.pm index 13b5dc6..1160e6b 100644 --- a/lib/LaTeX/TikZ/Set/Union.pm +++ b/lib/LaTeX/TikZ/Set/Union.pm @@ -20,7 +20,7 @@ use LaTeX::TikZ::Functor; use LaTeX::TikZ::Tools; -use Any::Moose; +use Mouse; =head1 RELATIONSHIPS diff --git a/lib/LaTeX/TikZ/Tools.pm b/lib/LaTeX/TikZ/Tools.pm index d2d1131..f4e536e 100644 --- a/lib/LaTeX/TikZ/Tools.pm +++ b/lib/LaTeX/TikZ/Tools.pm @@ -15,7 +15,7 @@ Version 0.02 our $VERSION = '0.02'; -use Any::Moose 'Util::TypeConstraints' => [ 'find_type_constraint' ]; +use Mouse::Util::TypeConstraints 'find_type_constraint'; =head1 CONSTANTS diff --git a/t/00-load.t b/t/00-load.t index 1fa8c0f..255a967 100644 --- a/t/00-load.t +++ b/t/00-load.t @@ -46,10 +46,3 @@ BEGIN { } diag( "Testing LaTeX::TikZ $LaTeX::TikZ::VERSION, Perl $], $^X" ); - -use Any::Moose; - -my $moose = any_moose(); -my $version = do { no strict 'refs'; ${$moose . '::VERSION'} }; - -diag( "Any::Moose uses $moose $version" ); diff --git a/t/02-autocoerce.t b/t/02-autocoerce.t index 39ab616..b171715 100644 --- a/t/02-autocoerce.t +++ b/t/02-autocoerce.t @@ -40,14 +40,12 @@ use LaTeX::TikZ::Meta::TypeConstraint::Autocoerce; { package LaTeX::TikZ::TestX; - use Any::Moose; - use Any::Moose 'Util::TypeConstraints' => [ qw< - coerce - from - via + use Mouse; + use Mouse::Util::TypeConstraints qw< + coerce from via find_type_constraint register_type_constraint - > ]; + >; has 'id' => ( is => 'ro', @@ -83,7 +81,7 @@ use LaTeX::TikZ::Meta::TypeConstraint::Autocoerce; { package LaTeX::TikZ::TestY; - use Any::Moose; + use Mouse; has 'num' => ( is => 'ro', @@ -99,7 +97,7 @@ use LaTeX::TikZ::Meta::TypeConstraint::Autocoerce; { package LaTeX::TikZ::TestZ; - use Any::Moose; + use Mouse; has 'x' => ( is => 'ro', @@ -108,7 +106,7 @@ use LaTeX::TikZ::Meta::TypeConstraint::Autocoerce; coerce => 1, ); - __PACKAGE__->meta->make_immutable if any_moose() ne 'Moose'; + __PACKAGE__->meta->make_immutable; sub main::Z () { __PACKAGE__ } } @@ -116,8 +114,8 @@ use LaTeX::TikZ::Meta::TypeConstraint::Autocoerce; { package LaTeX::TikZ::TestW; - use Any::Moose; - use Any::Moose 'Util::TypeConstraints'; + use Mouse; + use Mouse::Util::TypeConstraints; has 'x' => ( is => 'ro', diff --git a/t/92-pod-coverage.t b/t/92-pod-coverage.t index 8010f2e..80cee1d 100644 --- a/t/92-pod-coverage.t +++ b/t/92-pod-coverage.t @@ -13,13 +13,13 @@ load_or_skip_all('Pod::Coverage', '0.18' ); plan tests => 37; -my $moose_private = { also_private => [ qr/^BUILD$/, qr/^DEMOLISH$/ ] }; +my $mouse_private = { also_private => [ qr/^BUILD$/, qr/^DEMOLISH$/ ] }; # First load the interface so that no keywords are registered. pod_coverage_ok( 'LaTeX::TikZ::Interface' ); pod_coverage_ok( 'LaTeX::TikZ' ); -pod_coverage_ok( 'LaTeX::TikZ::Context', $moose_private ); +pod_coverage_ok( 'LaTeX::TikZ::Context', $mouse_private ); pod_coverage_ok( 'LaTeX::TikZ::Formatter' ); pod_coverage_ok( 'LaTeX::TikZ::Functor' ); pod_coverage_ok( 'LaTeX::TikZ::Functor::Rule' ); @@ -29,7 +29,7 @@ pod_coverage_ok( 'LaTeX::TikZ::Mod::Clip' ); pod_coverage_ok( 'LaTeX::TikZ::Mod::Color' ); pod_coverage_ok( 'LaTeX::TikZ::Mod::Fill' ); pod_coverage_ok( 'LaTeX::TikZ::Mod::Formatted' ); -pod_coverage_ok( 'LaTeX::TikZ::Mod::Layer', $moose_private ); +pod_coverage_ok( 'LaTeX::TikZ::Mod::Layer', $mouse_private ); pod_coverage_ok( 'LaTeX::TikZ::Mod::Pattern' ); pod_coverage_ok( 'LaTeX::TikZ::Mod::Pattern::Dots' ); pod_coverage_ok( 'LaTeX::TikZ::Mod::Pattern::Lines' ); @@ -38,11 +38,11 @@ pod_coverage_ok( 'LaTeX::TikZ::Mod::Scale' ); pod_coverage_ok( 'LaTeX::TikZ::Mod::Width' ); pod_coverage_ok( 'LaTeX::TikZ::Point' ); pod_coverage_ok( 'LaTeX::TikZ::Point::Math::Complex' ); -pod_coverage_ok( 'LaTeX::TikZ::Scope', $moose_private ); +pod_coverage_ok( 'LaTeX::TikZ::Scope', $mouse_private ); pod_coverage_ok( 'LaTeX::TikZ::Set' ); pod_coverage_ok( 'LaTeX::TikZ::Set::Arc' ); pod_coverage_ok( 'LaTeX::TikZ::Set::Arrow' ); -pod_coverage_ok( 'LaTeX::TikZ::Set::Chain', $moose_private ); +pod_coverage_ok( 'LaTeX::TikZ::Set::Chain', $mouse_private ); pod_coverage_ok( 'LaTeX::TikZ::Set::Circle' ); pod_coverage_ok( 'LaTeX::TikZ::Set::Container' ); pod_coverage_ok( 'LaTeX::TikZ::Set::Line' ); diff --git a/t/lib/LaTeX/TikZ/TestHelper.pm b/t/lib/LaTeX/TikZ/TestHelper.pm index 040fe82..3fc1fc0 100644 --- a/t/lib/LaTeX/TikZ/TestHelper.pm +++ b/t/lib/LaTeX/TikZ/TestHelper.pm @@ -5,9 +5,9 @@ use warnings; use Test::More (); -use Any::Moose 'Exporter'; +use Mouse::Exporter; -any_moose('Exporter')->setup_import_methods( +Mouse::Exporter->setup_import_methods( as_is => [ qw ], ); diff --git a/t/lib/LaTeX/TikZ/TestX/FromTestY.pm b/t/lib/LaTeX/TikZ/TestX/FromTestY.pm index 6dbffeb..3857116 100644 --- a/t/lib/LaTeX/TikZ/TestX/FromTestY.pm +++ b/t/lib/LaTeX/TikZ/TestX/FromTestY.pm @@ -1,6 +1,6 @@ package LaTeX::TikZ::TestX::FromTestY; -use Any::Moose 'Util::TypeConstraints'; +use Mouse::Util::TypeConstraints; coerce 'LaTeX::TikZ::TestX::Autocoerce' => from 'LaTeX::TikZ::TestY'