You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
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?
The text was updated successfully, but these errors were encountered: