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

Make inside-out hashes our instead of my #166

Open
kthakore opened this issue Jul 26, 2011 · 1 comment
Open

Make inside-out hashes our instead of my #166

kthakore opened this issue Jul 26, 2011 · 1 comment
Assignees
Labels

Comments

@kthakore
Copy link
Member

Because Perl offers an easy way to modify a module from outside its file, it is a bad idea to make all of the hashes for inside-out structures scoped to the file. If I wanted to make a quick change to an SDLx module that is inside-out, I would have to go in and edit the file. Then when I distribute my game, I have to provide the entire file of the module I have edited, when I may have only slightly changed one of the subs. If the inside-out hashes were package-scoped, everything would work:

package SDLx::Surface;
no warnings "redefine";
sub blit {
redefinition . . .
I have access to package-scoped vars, but not file-scoped ones
}

Any reason not to change it?

@kthakore
Copy link
Member Author

Author: ruoso
Time: 1285525109
Field: comment
Value: No... I don't see a problem in changing "my" to "our".... But I wonder why you would need such a weird hack, can't you use the accessors?

daniel

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

No branches or pull requests

1 participant