has 'password' => (
is => 'rw',
- isa => Str ',
- );
+ isa => 'Str',
+ );
has 'last_login' => (
is => 'rw',
isa => 'DateTime',
- handles => { 'last_login_date' => 'date' },
+ handles => { 'date_of_last_login' => 'date' },
);
sub login {
some attribute of the class.
You saw this in the User example, where we defined a delegation for
-the C<last_login_date()> method. Under the hood, this simple calls
-C<date()> on the User object's C<last_login_datetime> attribute.
+the C<date_of_last_login()> method. Under the hood, this simple calls
+C<date()> on the User object's C<last_login> attribute.
=head2 Constructor
on and read the Meta and Extending recipes, but those are mostly there
for people who want to be Moose wizards and change how Moose works.
+If you want to see how Moose would translate directly old school Perl
+5 OO code, check out the L<Moose::Unsweetened>.
+
=head1 AUTHOR
Dave Rolsky E<lt>autarch@urth.orgE<gt> and Stevan Little