Advertisement
Guest User

Untitled

a guest
Oct 8th, 2014
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. class User {
  2. has $.username;
  3. has $!password;
  4. has @.characters;
  5.  
  6. method new($username, $password, @characters) {
  7. self.bless(:$username, :$password, :@characters); # password is never set
  8. }
  9.  
  10. submethod BUILD (:$!password) {
  11. callsame;
  12. }
  13.  
  14. method checkPass($passAttempt) {
  15. say "CHECK: " ~ $!password;
  16. return $passAttempt eq $!password;
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement