Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class User {
- has $.username;
- has $!password;
- has @.characters;
- method new($username, $password, @characters) {
- self.bless(:$username, :$password, :@characters); # password is never set
- }
- submethod BUILD (:$!password) {
- callsame;
- }
- method checkPass($passAttempt) {
- say "CHECK: " ~ $!password;
- return $passAttempt eq $!password;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement