Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDLx setter methods should return $self #131

Open
kthakore opened this issue Jul 24, 2011 · 0 comments
Open

SDLx setter methods should return $self #131

kthakore opened this issue Jul 24, 2011 · 0 comments
Assignees

Comments

@kthakore
Copy link
Member

SDLx getter methods are also setter methods. When you call them with no arguments, you get what you asked for. When you call them with arguments, you set it... but you don't get back anything useful in most cases. In these cases, the best thing to return is $self, so you can stack more setting, like:

$sprite->x(30)->y(40)->rotation->(90)

I'll do this unless there are any problems.

@ghost ghost assigned Blaizer Jul 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants