Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 132084
Status: stalled
Priority: 0/
Queue: Moose

People
Owner: Nobody in particular
Requestors: CDRAKE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.2012
Fixed in: (no value)



Subject: 2 Possible logic errors in example
The example below appears to over-write the "date_of_last_login", so ends up returning the current date (which is the date of this login, not the "date of last login"). It also ignores the results of the login. use User; my $user = User->new( first_name => 'Example', last_name => 'User', password => 'letmein', ); $user->login('letmein'); say $user->date_of_last_login; my guess at the fix would be this:- use User; my $user = User->new( first_name => 'Example', last_name => 'User', password => 'letmein', ); my $last_login = $user->date_of_last_login; if($user->login('letmein')) { say $last_login; }
It's impossible to see what's going on here because you didn't include the definition of 'User'.