$file = "lib/$file.pm";
my %PREREQ_PM = (
- 'Any::Moose' => 0,
'Carp' => 0,
'List::Util' => 0,
'Math::Complex' => 0,
=head1 DEPENDENCIES
-L<Any::Moose> with L<Mouse> 0.80 or greater.
+L<Mouse> 0.80 or greater.
L<Sub::Name>.
use LaTeX::TikZ::Tools;
-use Any::Moose;
+use Mouse;
=head1 ATTRIBUTES
use LaTeX::TikZ::Tools;
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints';
+use Mouse;
+use Mouse::Util::TypeConstraints;
=head1 ATTRIBUTES
},
);
-__PACKAGE__->meta->make_immutable if any_moose() ne 'Moose';
+__PACKAGE__->meta->make_immutable;
=head1 SEE ALSO
use Carp ();
-use Any::Moose;
-use Any::Moose 'Util' => [ qw<find_meta does_role> ];
-use Any::Moose 'Util::TypeConstraints';
+use Mouse;
+use Mouse::Util qw<find_meta does_role>;
+use Mouse::Util::TypeConstraints;
=head1 ATTRIBUTES
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')) {
# 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',
# 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',
# 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) };
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<Moose> and L<Mouse> by using L<Any::Moose>.
+It only supports L<Mouse> currently.
-Note that you will need L<Moose::Util::TypeConstraints/register_type_constraint> or L<Mouse::Util::TypeConstraints/register_type_constraint> to install this type constraint, and that the latter is only available starting L<Mouse> C<0.63>.
+Note that you will need L<Mouse::Util::TypeConstraints/register_type_constraint> to install this type constraint, which is only available starting L<Mouse> C<0.63>.
=cut
use LaTeX::TikZ::Tools;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
-This class inherits from L<Moose::Meta::TypeConstraint> or L<Mouse::Meta::TypeConstraint>, depending on which mode L<Any::Moose> runs.
+This class inherits from L<Mouse::Meta::TypeConstraint>.
=cut
-extends any_moose('Meta::TypeConstraint');
+extends 'Mouse::Meta::TypeConstraint';
=head1 ATTRIBUTES
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<Moose> or L<Mouse> type constraint metaclass.
+This attribute is inherited from the L<Mouse> type constraint metaclass.
=head2 C<mapper>
has 'target' => (
is => 'ro',
- isa => any_moose('Meta::TypeConstraint'),
+ isa => 'Mouse::Meta::TypeConstraint',
required => 1,
);
$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) = @_;
=head1 SEE ALSO
-L<Moose::Meta::TypeConstraint>, L<Mouse::Meta::TypeConstraint>.
+L<Mouse::Meta::TypeConstraint>.
=head1 AUTHOR
=cut
-use Any::Moose 'Role';
-use Any::Moose 'Util::TypeConstraints';
+use Mouse::Role;
+use Mouse::Util::TypeConstraints;
=head1 METHODS
use LaTeX::TikZ::Tools;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Interface;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Interface;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
our $VERSION = '0.02';
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints' => [
- 'enum',
- qw<coerce from via>,
-];
+use Mouse;
+use Mouse::Util::TypeConstraints qw<enum coerce from via>;
=head1 ATTRIBUTES
use LaTeX::TikZ::Interface;
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints';
+use Mouse;
+use Mouse::Util::TypeConstraints;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Interface;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
use Sub::Name ();
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints';
+use Mouse;
+use Mouse::Util::TypeConstraints;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Tools;
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints';
+use Mouse;
+use Mouse::Util::TypeConstraints;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Interface;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Tools;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Tools;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
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
use LaTeX::TikZ::Point;
-use Any::Moose 'Util::TypeConstraints' => [ qw<
- class_type
- coerce
- from
- via
-> ];
+use Mouse::Util::TypeConstraints qw<class_type coerce from via>;
my $mc_tc = class_type 'Math::Complex';
use LaTeX::TikZ::Tools;
-use Any::Moose;
+use Mouse;
=head1 ATTRIBUTES
use LaTeX::TikZ::Tools;
-use Any::Moose 'Role';
+use Mouse::Role;
=head1 ATTRIBUTES
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');
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');
use LaTeX::TikZ::Tools;
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints' => [ qw<subtype as coerce from via> ];
+use Mouse;
+use Mouse::Util::TypeConstraints qw<subtype as coerce from via>;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Tools;
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints';
+use Mouse;
+use Mouse::Util::TypeConstraints;
=head1 RELATIONSHIPS
our $VERSION = '0.02';
-use Any::Moose 'Role';
+use Mouse::Role;
=head1 METHODS
use LaTeX::TikZ::Interface;
use LaTeX::TikZ::Functor;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
=cut
-use Any::Moose 'Role';
+use Mouse::Role;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Interface;
use LaTeX::TikZ::Functor;
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints';
+use Mouse;
+use Mouse::Util::TypeConstraints;
=head1 RELATIONSHIPS
}
);
-__PACKAGE__->meta->make_immutable if any_moose() ne 'Moose';
+__PACKAGE__->meta->make_immutable;
=head1 SEE ALSO
use LaTeX::TikZ::Interface;
use LaTeX::TikZ::Functor;
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints';
+use Mouse;
+use Mouse::Util::TypeConstraints;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Interface;
use LaTeX::TikZ::Functor;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Interface;
use LaTeX::TikZ::Functor;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Interface;
use LaTeX::TikZ::Functor;
-use Any::Moose;
-use Any::Moose 'Util::TypeConstraints'
- => [ qw<subtype as where find_type_constraint> ];
+use Mouse;
+use Mouse::Util::TypeConstraints qw<subtype as where find_type_constraint>;
=head1 RELATIONSHIPS
use LaTeX::TikZ::Tools;
-use Any::Moose;
+use Mouse;
=head1 RELATIONSHIPS
our $VERSION = '0.02';
-use Any::Moose 'Util::TypeConstraints' => [ 'find_type_constraint' ];
+use Mouse::Util::TypeConstraints 'find_type_constraint';
=head1 CONSTANTS
}
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" );
{
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',
{
package LaTeX::TikZ::TestY;
- use Any::Moose;
+ use Mouse;
has 'num' => (
is => 'ro',
{
package LaTeX::TikZ::TestZ;
- use Any::Moose;
+ use Mouse;
has 'x' => (
is => 'ro',
coerce => 1,
);
- __PACKAGE__->meta->make_immutable if any_moose() ne 'Moose';
+ __PACKAGE__->meta->make_immutable;
sub main::Z () { __PACKAGE__ }
}
{
package LaTeX::TikZ::TestW;
- use Any::Moose;
- use Any::Moose 'Util::TypeConstraints';
+ use Mouse;
+ use Mouse::Util::TypeConstraints;
has 'x' => (
is => 'ro',
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' );
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' );
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' );
use Test::More ();
-use Any::Moose 'Exporter';
+use Mouse::Exporter;
-any_moose('Exporter')->setup_import_methods(
+Mouse::Exporter->setup_import_methods(
as_is => [ qw<using check is_point_ok> ],
);
package LaTeX::TikZ::TestX::FromTestY;
-use Any::Moose 'Util::TypeConstraints';
+use Mouse::Util::TypeConstraints;
coerce 'LaTeX::TikZ::TestX::Autocoerce'
=> from 'LaTeX::TikZ::TestY'