Commit | Line | Data |
d3f79b34 |
1 | package Mouse::Spec; |
d3f79b34 |
2 | use strict; |
43e6a50b |
3 | use warnings; |
d3f79b34 |
4 | |
123fd4f8 |
5 | our $VERSION = '0.50_09'; |
d3f79b34 |
6 | |
7 | our $MouseVersion = $VERSION; |
5eef6e99 |
8 | our $MooseVersion = '0.93'; |
d3f79b34 |
9 | |
1b9e472d |
10 | sub MouseVersion{ $MouseVersion } |
11 | sub MooseVersion{ $MooseVersion } |
12 | |
d3f79b34 |
13 | 1; |
14 | __END__ |
7fc043cc |
15 | |
16 | =head1 NAME |
17 | |
18 | Mouse::Spec - To what extent Mouse is compatible with Moose |
19 | |
a25ca8d6 |
20 | =head1 VERSION |
21 | |
123fd4f8 |
22 | This document describes Mouse version 0.50_09 |
a25ca8d6 |
23 | |
976891fa |
24 | =head1 SYNOPSIS |
25 | |
26 | use Mouse::Spec; |
27 | |
28 | printf "Mouse/%s is compatible with Moose/%s\n", |
29 | Mouse::Spec->MouseVersion, Mouse::Spec->MooseVersion; |
30 | |
7fc043cc |
31 | =head1 DESCRIPTION |
32 | |
dad32ff2 |
33 | Mouse is a subset of Moose. This document describes to what extend Mouse is |
34 | compatible with Moose. |
ff012e5d |
35 | |
36 | =head2 Compatibility with Moose |
37 | |
dad32ff2 |
38 | The sugary API is highly compatible with Moose. |
39 | |
ff012e5d |
40 | =head2 Incompatibility with Moose |
41 | |
42 | =head3 Meta object protocols |
43 | |
4fbbc656 |
44 | Any MOP in Mouse has no attributes by default. |
dad32ff2 |
45 | |
f6387355 |
46 | For this reason, C<< $metaclass->meta->make_immutable() >> does not yet work as you expect. |
47 | B<Don not make metaclasses immutable>. |
ff012e5d |
48 | |
de236787 |
49 | =head3 Mouse::Meta::Instance |
ff012e5d |
50 | |
4f74e488 |
51 | Meta instance mechanism is not implemented. |
52 | |
53 | =head3 Role exclusion |
54 | |
55 | Role exclusion, C<exclude()>, is not implemented. |
56 | |
dad32ff2 |
57 | =head3 -metaclass in Mouse::Exporter |
4f74e488 |
58 | |
dad32ff2 |
59 | C<< use Mouse -metaclass => ... >> are not implemented. |
60 | Use C<< use Mouse -traits => ... >> instead. |
a25ca8d6 |
61 | |
4fbbc656 |
62 | =head3 Mouse::Meta::Attribute::Native |
63 | |
64 | Native traits are not supported directly, but C<MouseX::NativeTraits> is |
65 | available on CPAN. Once you have installed it, you can use it as the same way |
66 | in Moose. That is, native traits are automatically loaded by Mouse. |
67 | |
68 | See L<MouseX::NativeTraits> for details. |
69 | |
7fc043cc |
70 | =head2 Notes about Moose::Cookbook |
71 | |
72 | Many recipes in L<Moose::Cookbook> fit L<Mouse>, including: |
73 | |
74 | =over 4 |
75 | |
76 | =item * |
77 | |
78 | L<Moose::Cookbook::Basics::Recipe1> - The (always classic) B<Point> example |
79 | |
80 | =item * |
81 | |
278448b8 |
82 | L<Moose::Cookbook::Basics::Recipe2> - A simple B<BankAccount> example |
7fc043cc |
83 | |
84 | =item * |
85 | |
86 | L<Moose::Cookbook::Basics::Recipe3> - A lazy B<BinaryTree> example |
87 | |
88 | =item * |
89 | |
90 | L<Moose::Cookbook::Basics::Recipe4> - Subtypes, and modeling a simple B<Company> class hierarchy |
91 | |
92 | =item * |
93 | |
278448b8 |
94 | L<Moose::Cookbook::Basics::Recipe5> - More subtypes, coercion in a B<Request> class |
7fc043cc |
95 | |
96 | =item * |
97 | |
278448b8 |
98 | L<Moose::Cookbook::Basics::Recipe6> - The augment/inner example |
7fc043cc |
99 | |
100 | =item * |
101 | |
278448b8 |
102 | L<Moose::Cookbook::Basics::Recipe7> - Making Moose fast with immutable |
7fc043cc |
103 | |
104 | =item * |
105 | |
278448b8 |
106 | L<Moose::Cookbook::Basics::Recipe8> - Builder methods and lazy_build |
7fc043cc |
107 | |
108 | =item * |
109 | |
278448b8 |
110 | L<Moose::Cookbook::Basics::Recipe9> - Operator overloading, subtypes, and coercion |
7fc043cc |
111 | |
112 | =item * |
113 | |
278448b8 |
114 | L<Moose::Cookbook::Basics::Recipe10> - Using BUILDARGS and BUILD to hook into object construction |
7fc043cc |
115 | |
116 | =item * |
117 | |
278448b8 |
118 | L<Moose::Cookbook::Roles::Recipe1> - The Moose::Role example |
7fc043cc |
119 | |
120 | =item * |
121 | |
8006ea01 |
122 | L<Moose::Cookbook::Roles::Recipe2> - Advanced Role Composition - method exclusion and aliasing |
7fc043cc |
123 | |
124 | =item * |
125 | |
278448b8 |
126 | L<Moose::Cookbook::Roles::Recipe3> - Applying a role to an object instance |
7fc043cc |
127 | |
128 | =item * |
129 | |
278448b8 |
130 | L<Moose::Cookbook::Meta::Recipe2> - A meta-attribute, attributes with labels |
7fc043cc |
131 | |
132 | =item * |
133 | |
278448b8 |
134 | L<Moose::Cookbook::Meta::Recipe3> - Labels implemented via attribute traits |
7fc043cc |
135 | |
136 | =item * |
137 | |
278448b8 |
138 | L<Moose::Cookbook::Extending::Recipe3> - Providing an alternate base object class |
7fc043cc |
139 | |
140 | =back |
141 | |
142 | =head1 SEE ALSO |
143 | |
144 | L<Mouse> |
145 | |
de236787 |
146 | L<Moose> |
147 | |
148 | L<Moose::Manual> |
149 | |
150 | L<Moose::Cookbook> |
151 | |
7fc043cc |
152 | =cut |
153 | |